← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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