← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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