← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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