← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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