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