← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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