← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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