← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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