← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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