← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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