← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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