← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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