← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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