← HTML comments lesson New set →

HTML Worksheet: Comments

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

Answer key

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

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