← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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