← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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