← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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