← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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