← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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