← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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