← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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