← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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