← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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