← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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