← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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