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 pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 2.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 4.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 5.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 6.True or false: <h1> has a closing tag. (a) False (b) True
-
7.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<p>Our school trip</p> - 8.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
- 9.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
10.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<p>My pets</p> (a) Hello, world! (b) Fun facts (c) My pets - 11.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) <html> (b) </head>
-
12.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 13.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
- 14.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
- 15.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
-
16.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My best friend</p>
<h2>Rain today</h2> - 17.Which of these is true of a web server? (a) shows pages from the web (b) colours code to help us (c) is where we type code (d) sends pages over the net
- 18.True or false: <h1> is an empty tag. (a) False (b) True
- 19.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
- 20.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
- 21.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My pets</h3>
<h3>Rain today</h3>
<h2>Hello, world!</h2> -
23.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> (a) My best friend (b) Our school trip (c) My pets - 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
- 25.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 26.True or false: <b> has a closing tag. (a) True (b) False
- 27.Which of these is an empty tag? (a) <input> (b) <title> (c) <p> (d) <li>
-
28.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<p>My pets</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> - 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
30.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) news.html (b) Contact us (c) href (d) About us - 31.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
32.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="150"> (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png -
33.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<strong>Fun facts
<b>Our school trip</b> (a) </i> (b) </em> (c) </b> (d) </strong> -
34.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) maths.html (b) https://example.com (c) Contact us (d) contact.html - 35.Which of these is true of a code editor? (a) shows line numbers (b) stores a website’s files (c) answers page requests (d) has an address bar
- 36.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
- 37.True or false: a web browser colours code to help us. (a) False (b) True
- 38.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
- 39.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
40.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Good morning!</h2>
<h2>Good morning!</h2>
Answer key
- 250
- <ul>
- in the head
- No
- Yes
- True
- 1
- opens it in a new tab
- Yes
- Fun facts
- <html>
- in a new tab
- a web server
- <li>
- HyperText
- 2
- sends pages over the net
- False
- <h5>
- </html>
- a closing tag
- 4
- Our school trip
- <img>
- <ol>
- True
- <input>
- 4
- <ul>
- About us
- in the body
- fort.jpg
- </strong>
- contact.html
- shows line numbers
- <h1>
- False
- starts a new line
- an opening tag
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids