← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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