← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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