← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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