← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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