← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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