← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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