← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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