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.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
-
2.🔍 One closing tag is missing. Which one?
<h2>My best friend</h2>
<small>Hello, world!
<p>The red kite</p> (a) </h3> (b) </small> (c) </p> (d) </h2> -
3.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) My pets (b) Our school trip (c) My best friend - 4.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
5.📋 What number does the browser show next to “Banana”?
<ol start="7">
<li>Litchi</li>
<li>Banana</li>
<li>Papaya</li>
</ol> -
6.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>Our school trip</p> -
7.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) maths.html (b) Art corner (c) School news (d) href - 8.True or false: <style> goes in the head. (a) False (b) True
-
9.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>Fun facts</p> - 10.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 11.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
- 12.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
-
13.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend
line 2: <h2>Cricket is fun.</h2>
line 3: <u>I love mangoes.</u> (a) line 1 (b) line 3 (c) line 2 - 14.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
-
15.📋 What number does the browser show next to “Orange”?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Orange</li>
</ol> - 16.Which of these is true of a web browser? (a) colours code to help us (b) has an address bar (c) saves our .html files (d) stores a website’s files
- 17.True or false: <ol> is an unordered list. (a) True (b) False
- 18.True or false: <br> is an empty tag. (a) False (b) True
-
19.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!
line 2: <h3>My pets</h3>
line 3: <p>I love mangoes.</p> (a) line 3 (b) line 2 (c) line 1 - 20.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
21.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> -
22.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Cricket is fun.</h4>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<h3>The red kite</h3> - 23.True or false: HTML on its own can show paragraphs. (a) False (b) True
-
24.🔍 One closing tag is missing. Which one?
<u>Our school trip</u>
<h3>Hello, world!</h3>
<b>Cricket is fun. (a) </u> (b) </b> (c) </h3> (d) </h2> - 25.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
- 26.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
27.🔗 Where does this link open?
<a href="about.html">Maths fun</a> (a) in the same tab (b) in a new tab - 28.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <h1>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 30.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p>
<p>My best friend</p>
<p>Our school trip</p> (a) My best friend (b) Hello, world! (c) Good morning! (d) Our school trip - 32.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 33.💬 How does an HTML comment end? (a) */ (b) --> (c) >> (d) //
-
34.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Grapes</li>
</ul> - 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
- 36.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 37.Which of these has a closing tag? (a) <br> (b) <hr> (c) <p> (d) <img>
- 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
- 39.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200">
Answer key
- .html
- </small>
- My best friend
- <ol>
- 8
- 3
- Art corner
- True
- 2
- an opening tag
- height
- <h1>
- line 1
- </html>
- 5
- has an address bar
- False
- True
- line 1
- an empty tag
- 1
- 3
- True
- </b>
- <a href="about.html">
- True
- in the same tab
- <h1>
- A happy dog
- a closing tag
- Hello, world!
- a web browser
- -->
- 2
- <h1>
- <ul>
- <p>
- <h2>
- starts a new line
- 200
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids