← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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