← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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