← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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