← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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