← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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