← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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