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