← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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