← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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