← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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