← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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