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