← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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