← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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