← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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