jacob.evans
jacob.evans 3d ago • 0 views

Background Color CSS multiple choice questions for Grade 8

Hey there! 👋 Learning about CSS background colors can be super fun and helps make websites look awesome. Let's dive into a quick guide and then test your knowledge with a cool quiz! 🎨
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
jessica.reyes Dec 30, 2025

📚 Quick Study Guide

    🎨
  • What is CSS Background Color? CSS background color adds color behind your text, images, or any element on a webpage. It's like painting the backdrop!
  • 🌈
  • CSS Property: The CSS property used to set the background color is `background-color`.
  • 💻
  • How to Use It: You apply it to HTML elements using CSS rules. For example: `body { background-color: lightblue; }` makes the whole page light blue.
  • 🏷️
  • Color Values: You can specify colors using names (like `red`, `blue`, `green`), hexadecimal codes (like `#FF0000` for red), RGB values (like `rgb(255, 0, 0)` for red), or even HSL values.
  • Hexadecimal Codes: Hex codes use a `#` followed by six characters (0-9 and A-F). The first two are for red, the next two for green, and the last two for blue.
  • RGB Values: RGB (Red, Green, Blue) values range from 0 to 255. `rgb(0, 0, 0)` is black, and `rgb(255, 255, 255)` is white.

🧪 Practice Quiz

  1. Question 1: Which CSS property is used to change the background color of an element?
    1. A. color
    2. B. text-color
    3. C. background-color
    4. D. element-color
  2. Question 2: What is the correct CSS syntax to set the background color of a `body` element to light green?
    1. A. body { color: lightgreen; }
    2. B. body { background-color: lightgreen; }
    3. C. body { text-background: lightgreen; }
    4. D. body { bg-color: lightgreen; }
  3. Question 3: Which of the following is a valid hexadecimal color code?
    1. A. rgb(255, 0, 0)
    2. B. lightblue
    3. C. #FF0000
    4. D. red
  4. Question 4: What color does the hexadecimal code `#000000` represent?
    1. A. White
    2. B. Red
    3. C. Blue
    4. D. Black
  5. Question 5: What does RGB stand for in RGB color values?
    1. A. Red, Green, Black
    2. B. Red, Gray, Blue
    3. C. Red, Green, Blue
    4. D. Rainbow, Green, Blue
  6. Question 6: Which RGB value represents the color white?
    1. A. rgb(0, 0, 0)
    2. B. rgb(255, 0, 0)
    3. C. rgb(0, 255, 0)
    4. D. rgb(255, 255, 255)
  7. Question 7: If you want to set the background color of all `

    ` elements to purple, what CSS rule would you use?
    1. A. h1 { color: purple; }
    2. B. h1 { background: purple; }
    3. C. h1 { background-color: purple; }
    4. D. h1 { text-color: purple; }

Click to see Answers
  1. Answer: C
  2. Answer: B
  3. Answer: C
  4. Answer: D
  5. Answer: C
  6. Answer: D
  7. Answer: C

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀