← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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