← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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