← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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