← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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