Confusing font-style with font-weight or text-decoration
3. What will be the visual result of this CSS code?
p { font-style: oblique; }
medium
A. The paragraph text will be hidden.
B. The paragraph text will be bold and underlined.
C. The paragraph text will be slanted slightly to the right.
D. The paragraph text will be normal with no slant.
Solution
Step 1: Understand the effect of font-style: oblique;
The oblique style makes text slanted, similar to italic but usually less angled.
Step 2: Compare options with expected visual output
Only The paragraph text will be slanted slightly to the right. describes the text slanting to the right, which matches the oblique style effect.
Final Answer:
The paragraph text will be slanted slightly to the right. -> Option C
Quick Check:
font-style: oblique; = slanted text [OK]
Hint: Oblique means slanted text, not bold or hidden [OK]
Common Mistakes:
Confusing oblique with bold or underline
Expecting no change in text style
Thinking oblique hides text
4. Identify the error in this CSS snippet:
h1 { font-style: italic oblique; }
medium
A. Multiple values are not allowed for font-style.
B. The property name is incorrect.
C. The semicolon is missing.
D. The value 'italic oblique' is valid and correct.
Solution
Step 1: Check allowed values for font-style
The font-style property accepts only one value at a time: normal, italic, or oblique.
Step 2: Analyze the given value
The value italic oblique is two values combined, which is invalid syntax.
Final Answer:
Multiple values are not allowed for font-style. -> Option A
Quick Check:
font-style accepts single value only [OK]
Hint: font-style takes only one value like italic or oblique [OK]
Common Mistakes:
Using multiple values separated by space
Misspelling property name
Omitting semicolon but still expecting valid CSS
5. You want to style a paragraph so that normal text is shown, but when hovered, the text becomes italic. Which CSS code correctly achieves this?
hard
A. p { font-style: italic; } p:hover { font-style: normal; }
B. p { font-style: normal; } p:hover { font-style: italic; }
C. p { font-style: oblique; } p:hover { font-style: bold; }
D. p { font-style: normal; } p:hover { font-weight: italic; }
Solution
Step 1: Set default font style to normal
The paragraph should start with font-style: normal; to show normal text.
Step 2: Change font style on hover to italic
Using the hover selector, set font-style: italic; to make text italic when hovered.
Step 3: Verify other options
Other options either reverse the effect (starting italic and changing to normal on hover), use invalid values like bold for font-style, or misuse font-weight for italic effect.
Final Answer:
p { font-style: normal; } p:hover { font-style: italic; } -> Option B
Quick Check:
Hover changes font-style to italic [OK]
Hint: Use :hover with font-style: italic for hover effect [OK]
Common Mistakes:
Using font-weight instead of font-style for italic
Reversing normal and italic styles
Using invalid values like 'bold' for font-style
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.