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