← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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