← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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