← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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