← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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