← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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