← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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