← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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