← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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