← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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