← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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