← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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