← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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