← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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