โ† 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 sets the background color of an element?

    Answer: background-color

    background-color sets the color behind the element's content.

  2. What is the default value of the 'color' property if not specified?

    Answer: Inherited from the parent

    The color property is inherited, so it takes the parent's value by default.

  3. Which of these is a valid way to apply CSS directly to one HTML element?

    Answer: Inline style attribute

    Inline CSS uses the style attribute on the element itself.

  4. What does the CSS property 'opacity: 0.5;' do?

    Answer: Makes the element 50% transparent

    Opacity 0.5 renders the element at 50% transparency.

  5. Which shorthand hex code is equivalent to #FF0000?

    Answer: #F00

    #F00 expands to #FF0000, which is pure red.

  6. How is an external stylesheet linked to an HTML document?

    Answer:

    A element with rel='stylesheet' references an external CSS file.

  7. What color does the named CSS keyword 'transparent' produce?

    Answer: Fully see-through

    The 'transparent' keyword equals a fully transparent color (alpha 0).