← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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