← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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