← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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