← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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