← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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