← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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