← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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