← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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