← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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