← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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