← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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