← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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