← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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