← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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