← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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