← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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