← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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