← All CSS Flashcard Decks

(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
  1. 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.

  2. What does the hexadecimal color value #FFFFFF represent?

    Answer: White

    #FFFFFF is full intensity on all RGB channels, producing white.

  3. Which function lets you specify a color with an alpha (transparency) channel?

    Answer: rgba()

    rgba() adds a fourth alpha value (0–1) controlling opacity.

  4. How do you write a single-line comment in CSS?

    Answer: /* comment */

    CSS uses /* */ for all comments; there is no // syntax.

  5. 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.

  6. 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.

  7. In the HSL color model, what does the first value represent?

    Answer: Hue

    HSL stands for Hue, Saturation, Lightness, with hue measured in degrees.