← Colour and text properties lesson New set →

CSS Worksheet: Colour and Text Properties

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

Answer key

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

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