← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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