← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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