← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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