← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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