← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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