← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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