← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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