← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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