← HTML comments lesson New set →

HTML Worksheet: Comments

HTML and CSS lesson 9: HTML comments · Set 997 · 40 questions
TalentJR

Code tip (Hidden notes): A comment is <!-- note -->: it starts with <!-- and ends with -->. Anything inside a comment, even a whole <p>, is not shown. Comments can be read with “view source” — never put secrets in them.

NameDateTime takenScore ___ / 40
  1. 1.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
    (a) Good morning! (b) The red kite (c) Rain today (d) Our school trip
  3. 3.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  4. 4.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  5. 5.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) My pets (b) Cricket is fun. (c) Good morning! (d) Rain today
  6. 6.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    (a) I love mangoes. (b) My pets (c) My best friend (d) Hello, world!
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
  8. 8.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Good morning!</p>
    (a) Hello, world! (b) Good morning! (c) I love mangoes. (d) My pets
  10. 10.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  11. 11.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
  13. 13.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    (a) Fun facts (b) My best friend (c) Rain today
  14. 14.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) The red kite (c) My pets
  15. 15.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>Good morning!</p>
  18. 18.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    (a) The red kite (b) Rain today (c) Hello, world!
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  20. 20.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
  21. 21.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    (a) The red kite (b) I love mangoes. (c) Our school trip (d) Rain today
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Fun facts (b) Rain today (c) Good morning!
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
  24. 24.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>I love mangoes.</p> -->
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>Rain today</p>
  27. 27.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Rain today</p>
    (a) The red kite (b) Rain today (c) Our school trip (d) Cricket is fun.
  28. 28.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    (a) Fun facts (b) My pets (c) Cricket is fun. (d) Good morning!
  29. 29.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    (a) My pets (b) I love mangoes. (c) Fun facts (d) Rain today
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
  32. 32.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
  35. 35.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
  36. 36.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
  37. 37.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    (a) Fun facts (b) I love mangoes. (c) Our school trip (d) Rain today
  38. 38.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    (a) My pets (b) My best friend (c) Fun facts
  39. 39.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) My pets (c) Fun facts

Answer key

  1. 2
  2. The red kite
  3. 2
  4. 2
  5. Rain today
  6. My pets
  7. 1
  8. 4
  9. I love mangoes.
  10. 2
  11. to leave notes
  12. 1
  13. Rain today
  14. Hello, world!
  15. -->
  16. 1
  17. 2
  18. Hello, world!
  19. 4
  20. 3
  21. I love mangoes.
  22. Rain today
  23. 1
  24. 2
  25. 1
  26. 2
  27. Our school trip
  28. My pets
  29. Rain today
  30. 1
  31. 1
  32. <!--
  33. Hello, world!
  34. 1
  35. 3
  36. 2
  37. Our school trip
  38. Fun facts
  39. 2
  40. My pets

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