← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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