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