← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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