← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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