← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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