← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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