← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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