(Fundamentals, Colors, and Styling) Flashcards
7 cards from real CSS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 (Fundamentals, Colors, and Styling) flashcards as text
Which property would you use to add an underline to text?
Answer: text-decoration
text-decoration: underline draws a line beneath text.
What does the CSS keyword 'inherit' do?
Answer: Takes the computed value of the parent
The 'inherit' value forces a property to use its parent's computed value.
Which is the correct order of values for the 'rgb()' function?
Answer: red, green, blue
rgb() takes red, then green, then blue in that order.
How do you make text appear in uppercase using CSS only?
Answer: text-transform: uppercase;
text-transform: uppercase converts text to all capital letters.
What is the effect of setting 'color: inherit;' on a child element?
Answer: It uses the parent's text color
inherit makes the child adopt the parent's color value.
Which CSS property changes the typeface (e.g., Arial, Times New Roman)?
Answer: font-family
font-family specifies the typeface(s) used for text.
What does a CSS declaration ending without a semicolon risk?
Answer: Breaking the next declaration in the rule
Omitting the semicolon can merge the declaration with the next, breaking it.