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