← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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