← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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