← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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