← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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