← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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