← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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