← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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