← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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