← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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