← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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