← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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