← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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