← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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