← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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