Which CSS property is used to change the font family of text?
A
font-style B
font-family C
font-weight D
text-font
Analysis & Theory
`font-family` sets the font family of the text.
Which of the following is the correct syntax to specify multiple fallback fonts?
A
font-family: Arial, Helvetica, sans-serif; B
font-family: Arial; Helvetica; sans-serif; C
font-family: Arial | Helvetica | sans-serif; D
font-family: Arial + Helvetica + sans-serif;
Analysis & Theory
Fonts are listed separated by commas as fallback options.
How do you apply italic style to text?
A
font-style: italic; B
font-weight: italic; C
font-variant: italic; D
text-style: italic;
Analysis & Theory
`font-style: italic;` makes the text italicized.
Which CSS property controls the thickness of the font?
A
font-weight B
font-style C
font-variant D
font-thickness
Analysis & Theory
`font-weight` controls how thick or bold the text appears.
What is the default value of `font-weight`?
A
normal B
bold C
lighter D
400
Analysis & Theory
`normal` is the default font weight.
Which value of `font-weight` represents bold text?
A
100 B
400 C
700 D
900
Analysis & Theory
Font weight `700` is typically interpreted as bold.
Which property is used to set the size of the font?
A
font-size B
text-size C
font-style D
text-style
Analysis & Theory
`font-size` controls the size of the font.
Which of the following is a valid value for `font-size`?
A
12px B
1.5em C
80% D
All of the above
Analysis & Theory
`font-size` accepts units like pixels (px), em, percentages, and more.
How do you specify a generic font family as a fallback?
A
Include generic family like `serif` or `sans-serif` at the end of the font list B
Use the keyword `fallback` C
Specify font as `default` D
Generic fonts cannot be specified
Analysis & Theory
Generic families like `serif`, `sans-serif`, or `monospace` are used as fallbacks.
What does the CSS rule `font-style: normal;` do?
A
Makes the text italic B
Resets text to normal style (non-italic) C
Makes the text bold D
Underlines the text
Analysis & Theory
`font-style: normal;` ensures the text is not italicized.