← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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