← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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