← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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