← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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