← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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