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.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 2.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
- 3.True or false: <h1> is an empty tag. (a) False (b) True
- 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
- 5.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 6.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 7.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
-
8.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> - 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 3 (d) 10
- 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 11.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
12.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> -
13.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.</p>
line 2: <h2>My pets
line 3: <b>I love mangoes.</b> (a) line 2 (b) line 1 (c) line 3 -
14.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) news.html (b) School news (c) href (d) Take the quiz -
15.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <b>My pets
line 3: <strong>The red kite</strong> (a) line 1 (b) line 3 (c) line 2 - 16.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
-
17.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today
line 2: <em>Fun facts</em>
line 3: <u>I love mangoes.</u> (a) line 1 (b) line 3 (c) line 2 - 18.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h5>
- 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as 5 spaces (d) as a new line
- 20.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
- 21.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
- 22.True or false: a web browser opens web pages for us. (a) False (b) True
- 23.True or false: a code editor is where we type code. (a) True (b) False
- 24.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
25.🔍 One closing tag is missing. Which one?
<h2>My best friend</h2>
<h3>Hello, world!</h3>
<b>The red kite (a) </b> (b) </h3> (c) </em> (d) </h2> - 26.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
-
27.🔍 One closing tag is missing. Which one?
<em>Fun facts</em>
<h1>Cricket is fun.</h1>
<p>Our school trip (a) </p> (b) </h1> (c) </em> (d) </i> - 28.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
- 29.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 30.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>
- 31.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 32.💬 Does the browser show comments on the page? (a) Yes (b) No
-
33.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) kite.png (b) map.png (c) A tiger asleep (d) tiger.jpg -
34.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) My pets (b) I love mangoes. (c) Rain today -
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<p>I love mangoes.</p>
<p>Our school trip</p> - 36.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
-
37.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> - 38.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
-
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) body (c) Welcome! (d) Thanks for visiting. - 40.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) answers page requests (d) stores a website’s files
Answer key
- <!DOCTYPE html>
- a web server
- False
- <h5>
- False
- <ol>
- a web server
- 2
- 1
- Yes
- an opening tag
- 4
- line 2
- School news
- line 2
- <img>
- line 1
- <h1>
- as one space
- alt
- </small>
- True
- True
- an opening tag
- </b>
- <ol>
- </p>
- alt
- in the head
- </h3>
- in the head
- No
- tiger.jpg
- My pets
- 1
- a web server
- 2
- a line across the page
- Welcome!
- turns HTML into a page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids