← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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