← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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