← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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