(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 CSS property is used to change the text color of an element?
Answer: color
The 'color' property sets the foreground (text) color of an element.
What does the hexadecimal color value #FFFFFF represent?
Answer: White
#FFFFFF is full intensity on all RGB channels, producing white.
Which function lets you specify a color with an alpha (transparency) channel?
Answer: rgba()
rgba() adds a fourth alpha value (0–1) controlling opacity.
How do you write a single-line comment in CSS?
Answer: /* comment */
CSS uses /* */ for all comments; there is no // syntax.
Which property controls the space between the content and the element's border?
Answer: padding
Padding is the inner space between content and the border.
What is the correct CSS syntax to make all elements bold?
Answer: p {font-weight: bold;}
font-weight: bold applied to the p selector bolds all paragraphs.
In the HSL color model, what does the first value represent?
Answer: Hue
HSL stands for Hue, Saturation, Lightness, with hue measured in degrees.