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