← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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