← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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