0
0
CSSmarkup~20 mins

Font style in CSS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Font Style Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate
1:30remaining
What is the output of this CSS snippet?
Consider the following CSS code applied to a paragraph. What will be the font style of the text inside the paragraph?
CSS
p {
  font-style: italic;
}
AThe paragraph text will be italicized.
BThe paragraph text will be underlined.
CThe paragraph text will be bold.
DThe paragraph text will be normal (no style).
Attempts:
2 left
💡 Hint
The font-style property controls whether text is normal, italic, or oblique.
🧠 Conceptual
intermediate
1:30remaining
Which font-style value makes text slanted but not fully italic?
In CSS, which font-style value creates a slanted text that is different from italic?
Anormal
Boblique
Citalic
Dbold
Attempts:
2 left
💡 Hint
Think about the difference between italic and oblique styles.
rendering
advanced
2:00remaining
What will the text look like with this CSS?
Given this CSS applied to a heading, what is the visual style of the text?
CSS
h1 {
  font-style: oblique 20deg;
}
AThe heading text is italicized with a 20-degree slant.
BThe heading text is bold and underlined.
CThe heading text is normal with no slant.
DThe heading text is slanted at a 20-degree angle but not italicized.
Attempts:
2 left
💡 Hint
The oblique value can take an angle to control the slant.
selector
advanced
1:30remaining
Which CSS selector applies font-style only to paragraphs inside a section?
You want to make only paragraphs inside a <section> italic. Which CSS selector correctly targets them?
Asection > p { font-style: normal; }
Bp section { font-style: italic; }
Csection p { font-style: italic; }
Dp { font-style: italic; }
Attempts:
2 left
💡 Hint
Think about how to select paragraphs that are inside a section.
accessibility
expert
2:00remaining
Why should you avoid using only font-style to convey important info?
Using only font-style: italic; to highlight important text can cause what accessibility issue?
AScreen readers may not announce the italic style, causing confusion.
BItalic text is always harder to read for everyone.
CItalic style disables keyboard navigation.
DIt causes the text to be invisible on some browsers.
Attempts:
2 left
💡 Hint
Think about how assistive technologies interpret visual styles.