← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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