← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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