← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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