← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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