← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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