HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
-
1.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>The red kite</p> --> -
2.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<h3>I love mangoes.</h3>
<h2>My best friend (a) </h3> (b) </h2> (c) </strong> (d) </h1> -
3.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> (a) I love mangoes. (b) My pets (c) Our school trip -
4.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
5.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> (a) My best friend (b) Good morning! (c) My pets - 6.Which of these is an opening tag? (a) </body> (b) </li> (c) <li> (d) </h1>
-
7.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Our school trip</h4>
<p>Rain today</p> - 8.Which of these is a closing tag? (a) </p> (b) <h1> (c) <body> (d) <li>
- 9.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
-
10.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in a new tab (b) in the same tab - 11.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 13.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h1> (c) <h2> (d) <h3>
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="350"> - 15.True or false: in <img>, alt sets how wide it is. (a) False (b) True
-
16.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Stars shine</p> - 17.🌍 Which program shows a web page to us? (a) a calculator (b) a paint program (c) a music player (d) a web browser
- 18.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
-
19.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Cricket is fun. (b) My pets (c) Good morning! (d) I love mangoes. - 20.True or false: HTML on its own cannot count button clicks. (a) True (b) False
-
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Our school trip</p> -
22.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Cricket is fun.</p>
<p>My pets</p> -
23.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="100"> - 24.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
25.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> - 26.🔍 Which is the odd one out? (a) sends pages over the net (b) stores a website’s files (c) hosts websites online (d) opens web pages for us
-
27.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p> -
28.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today</strong>
line 2: <p>Good morning!</p>
line 3: <u>Hello, world! (a) line 1 (b) line 2 (c) line 3 - 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
- 30.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
- 31.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
- 32.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
- 33.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
- 34.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
- 35.True or false: HTML on its own can make headings. (a) False (b) True
- 36.🧱 HTML gives a web page its ___. (a) colours (b) structure (c) sound (d) speed
- 37.True or false: HTML on its own cannot make headings. (a) False (b) True
-
38.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Sky is blue</p> - 39.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 40.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) alt (d) width
Answer key
- 1
- </h2>
- Our school trip
- numbers
- My pets
- <li>
- 2
- </p>
- <h5>
- in the same tab
- has a closing tag
- in the head
- <h6>
- 350
- False
- 3
- a web browser
- <li>
- My pets
- True
- 2
- 1
- 100
- an opening tag
- 2
- opens web pages for us
- 3
- line 3
- <h1>
- <h6>
- a code editor
- height
- <h1>
- alt
- True
- structure
- False
- 3
- in the body
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids