← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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