← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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