← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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