← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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