← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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