← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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