← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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