← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

HTML and CSS lesson 14: Colour and text properties · Set 261 · 40 questions
TalentJR

Code tip (Letters, behind, size, place): color = colour of the letters; background-color = colour behind them. font-size = how big (e.g. 20px); font-weight: bold = thick letters; font-family = the font. text-align: left / center / right places the text on its line.

NameDateTime takenScore ___ / 40
  1. 1.🖌️ What colour is behind the letters?
    h1 {
      text-align: center;
      font-size: 16px;
      background-color: purple;
      color: red;
    }
    (a) red (b) yellow (c) purple
  2. 2.🖌️ What colour is behind the letters?
    li {
      text-align: center;
      font-size: 12px;
      background-color: white;
      color: orange;
    }
    (a) white (b) black (c) orange
  3. 3.What does font-size do? (a) makes letters bigger (b) colours behind the text (c) makes the text bold (d) centres a heading
  4. 4.What does text-align do? (a) colours behind the text (b) makes the text bold (c) picks the font style (d) centres a heading
  5. 5.🖌️ What colour are the letters?
    h1 {
      font-size: 24px;
      color: orange;
      background-color: blue;
      text-align: right;
    }
    (a) green (b) orange (c) blue
  6. 6.🖌️ Which CSS property colours behind the text? (a) background-color (b) font-size (c) font-family (d) color
  7. 7.🖌️ Which CSS property picks the font style? (a) color (b) background-color (c) text-align (d) font-family
  8. 8.What does background-color do? (a) colours behind the text (b) sets the letter colour (c) centres a heading (d) makes letters bigger
  9. 9.🖌️ What colour is behind the letters?
    h1 {
      text-align: left;
      font-size: 32px;
      color: blue;
      background-color: white;
    }
    (a) white (b) blue (c) orange
  10. 10.🖌️ Which CSS property makes the text bold? (a) font-family (b) text-align (c) font-weight (d) color
  11. 11.🖌️ What colour are the letters?
    li {
      background-color: purple;
      text-align: left;
      font-size: 16px;
      color: green;
    }
    (a) purple (b) black (c) green
  12. 12.🖌️ How big is the text, in px?
    li {
      background-color: red;
      text-align: center;
      color: green;
      font-size: 40px;
    }
  13. 13.🖌️ Where does the text sit on its line?
    p {
      color: green;
      font-size: 36px;
      background-color: black;
      text-align: right;
    }
    (a) in the middle (b) on the right (c) on the left
  14. 14.🖌️ What colour are the letters?
    h2 {
      color: green;
      text-align: right;
      font-size: 28px;
      background-color: black;
    }
    (a) blue (b) black (c) green
  15. 15.🖌️ How big is the text, in px?
    h1 {
      font-size: 32px;
      text-align: right;
      color: blue;
      background-color: red;
    }
  16. 16.🖌️ What colour are the letters?
    p {
      background-color: purple;
      color: orange;
      text-align: center;
      font-size: 16px;
    }
    (a) blue (b) orange (c) purple
  17. 17.🖌️ How big is the text, in px?
    li {
      text-align: right;
      font-size: 12px;
      color: green;
      background-color: orange;
    }
  18. 18.🖌️ What colour are the letters?
    h1 {
      font-size: 28px;
      color: white;
      text-align: left;
      background-color: red;
    }
    (a) blue (b) white (c) red
  19. 19.🖌️ Which CSS property makes letters bigger? (a) background-color (b) text-align (c) font-size (d) font-family
  20. 20.What does font-family do? (a) picks the font style (b) makes letters bigger (c) centres a heading (d) makes the text bold
  21. 21.What does font-weight do? (a) colours behind the text (b) centres a heading (c) makes the text bold (d) sets the letter colour
  22. 22.🖌️ What colour is behind the letters?
    h2 {
      text-align: right;
      background-color: red;
      color: orange;
      font-size: 36px;
    }
    (a) red (b) blue (c) orange
  23. 23.🖌️ What colour are the letters?
    p {
      font-size: 28px;
      color: red;
      text-align: right;
      background-color: purple;
    }
    (a) purple (b) white (c) red
  24. 24.What does color do? (a) sets the letter colour (b) centres a heading (c) makes the text bold (d) colours behind the text
  25. 25.🖌️ How big is the text, in px?
    h1 {
      color: red;
      font-size: 20px;
      text-align: center;
      background-color: white;
    }
  26. 26.🖌️ What colour are the letters?
    h2 {
      background-color: white;
      font-size: 16px;
      color: yellow;
      text-align: left;
    }
    (a) orange (b) white (c) yellow
  27. 27.🖌️ How big is the text, in px?
    li {
      font-size: 16px;
      background-color: green;
      text-align: left;
      color: orange;
    }
  28. 28.🖌️ What colour are the letters?
    p {
      color: black;
      text-align: right;
      background-color: red;
      font-size: 36px;
    }
    (a) red (b) black (c) green
  29. 29.🖌️ Which CSS property centres a heading? (a) background-color (b) text-align (c) color (d) font-family
  30. 30.🖌️ How big is the text, in px?
    h2 {
      background-color: blue;
      text-align: center;
      color: red;
      font-size: 32px;
    }
  31. 31.🖌️ Where does the text sit on its line?
    p {
      background-color: blue;
      font-size: 20px;
      text-align: left;
      color: white;
    }
    (a) on the right (b) on the left (c) in the middle
  32. 32.🖌️ How big is the text, in px?
    li {
      color: white;
      text-align: right;
      background-color: yellow;
      font-size: 40px;
    }
  33. 33.🖌️ What colour is behind the letters?
    h1 {
      font-size: 24px;
      text-align: center;
      color: purple;
      background-color: blue;
    }
    (a) yellow (b) blue (c) purple
  34. 34.🖌️ Where does the text sit on its line?
    h2 {
      background-color: green;
      text-align: center;
      color: orange;
      font-size: 12px;
    }
    (a) on the left (b) on the right (c) in the middle
  35. 35.🖌️ How big is the text, in px?
    li {
      font-size: 12px;
      color: yellow;
      background-color: white;
      text-align: right;
    }
  36. 36.🖌️ What colour is behind the letters?
    h1 {
      color: orange;
      text-align: right;
      font-size: 36px;
      background-color: purple;
    }
    (a) black (b) orange (c) purple
  37. 37.🖌️ What colour are the letters?
    h2 {
      color: orange;
      background-color: white;
      font-size: 40px;
      text-align: left;
    }
    (a) white (b) red (c) orange
  38. 38.🖌️ Where does the text sit on its line?
    p {
      background-color: black;
      color: yellow;
      font-size: 20px;
      text-align: left;
    }
    (a) on the left (b) in the middle (c) on the right
  39. 39.🖌️ Where does the text sit on its line?
    li {
      color: orange;
      text-align: right;
      background-color: black;
      font-size: 32px;
    }
    (a) on the right (b) in the middle (c) on the left
  40. 40.🖌️ How big is the text, in px?
    p {
      font-size: 12px;
      text-align: right;
      background-color: white;
      color: black;
    }

Answer key

  1. purple
  2. white
  3. makes letters bigger
  4. centres a heading
  5. orange
  6. background-color
  7. font-family
  8. colours behind the text
  9. white
  10. font-weight
  11. green
  12. 40
  13. on the right
  14. green
  15. 32
  16. orange
  17. 12
  18. white
  19. font-size
  20. picks the font style
  21. makes the text bold
  22. red
  23. red
  24. sets the letter colour
  25. 20
  26. yellow
  27. 16
  28. black
  29. text-align
  30. 32
  31. on the left
  32. 40
  33. blue
  34. in the middle
  35. 12
  36. purple
  37. orange
  38. on the left
  39. on the right
  40. 12

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids