← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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