← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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