← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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