← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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