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.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) games.html (b) news.html (c) quiz.html (d) Visit the site -
2.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>The red kite</p>
<p>Hello, world!</p>
<p>The red kite</p>
<p>The red kite</p> -
3.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> - 4.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
- 5.Which of these is a closing tag? (a) <h1> (b) <body> (c) </li> (d) <b>
- 6.True or false: <p> is an empty tag. (a) True (b) False
-
7.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p> -
8.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> -
9.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Hello, world!</h2>
<h2>Good morning!</h2>
<h4>Fun facts</h4> - 10.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) shows pages from the web (d) colours code to help us
- 11.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Modern (d) Mouse
- 12.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 13.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
- 14.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 15.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows line numbers (d) has an address bar
- 16.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
-
17.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <p>My pets
line 3: <u>I love mangoes.</u> (a) line 2 (b) line 1 (c) line 3 -
18.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<h4>Good morning!</h4> - 19.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </html> (c) <head> (d) <!DOCTYPE html>
- 20.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 21.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) turns HTML into a page (d) colours code to help us
- 22.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
- 23.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
- 24.🔍 Which is the odd one out? (a) has an address bar (b) saves our .html files (c) opens web pages for us (d) shows pages from the web
- 25.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
- 26.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 27.Which of these is an opening tag? (a) </b> (b) </p> (c) <body> (d) </title>
- 28.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
30.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Welcome! (c) index.html (d) Art Gallery - 31.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 32.Which of these goes in the head? (a) <a> (b) <table> (c) <ul> (d) <title>
-
33.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) School news (b) contact.html (c) about.html (d) https://example.com - 34.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h3>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
-
35.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) Fun facts (b) My best friend (c) The red kite (d) Good morning! - 36.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <u/> (d) <\u>
- 37.📝 What does <p> make? (a) a link (b) a paragraph (c) a table (d) a picture
- 38.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
- 39.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
- 40.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
Answer key
- news.html
- 5
- 300
- False
- </li>
- False
- 1
- 150
- 4
- shows pages from the web
- Markup
- Yes
- <ul>
- True
- has an address bar
- 1
- line 2
- 3
- </html>
- Yes
- turns HTML into a page
- <ul>
- <h5>
- saves our .html files
- <!DOCTYPE html>
- a closing tag
- <body>
- in the body
- <ol>
- Art Gallery
- has a closing tag
- <title>
- about.html
- <h6>
- Fun facts
- </u>
- a paragraph
- a code editor
- </h1>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids