← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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