← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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