← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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