← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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