← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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