← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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