← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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