← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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