← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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