← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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