← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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