← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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