← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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