← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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