← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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