← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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