← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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