← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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