← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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