← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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