← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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