← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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