← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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