← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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