← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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