← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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