← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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