← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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