← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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