← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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