← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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