← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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