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