← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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