← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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