← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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