← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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