← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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