← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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