← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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