← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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