← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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