← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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