← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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