← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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