← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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