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