← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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