← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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