← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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