← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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