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.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 2.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 3.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 4.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
- 5.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 6.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
- 7.Which of these is true of a code editor? (a) sends pages over the net (b) shows line numbers (c) opens web pages for us (d) has an address bar
-
8.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Rain today</h2>
<p>Hello, world!</p>
<p>The red kite</p>
<h3>The red kite</h3> - 9.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
- 10.True or false: HTML on its own can add up two numbers. (a) False (b) True
- 11.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 12.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 13.True or false: <h1> has a closing tag. (a) True (b) False
- 14.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
-
15.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) contact.html (b) Contact us (c) https://example.com (d) maths.html -
16.🔗 Where does this link open?
<a href="maths.html">About us</a> (a) in a new tab (b) in the same tab - 17.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Match report (b) Mars is red. (c) body (d) Space Facts - 19.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
- 20.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the body (d) the doctype
-
21.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.
line 2: <h2>The red kite</h2>
line 3: <h3>My best friend</h3> (a) line 2 (b) line 1 (c) line 3 - 22.True or false: in <img>, src names the picture file. (a) True (b) False
-
23.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> -
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Good morning!</p>
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> - 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
- 26.Which of these is an opening tag? (a) </h1> (b) </p> (c) </li> (d) <li>
- 27.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
-
28.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 29.True or false: <ul> shows bullet points. (a) False (b) True
- 30.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 31.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
32.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Class 7 Blog (c) body (d) Welcome! -
33.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> -
34.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Good morning!</p>
<h2>My pets</h2>
<p>Fun facts</p>
<h2>The red kite</h2>
<p>Cricket is fun.</p> - 35.True or false: a code editor saves our .html files. (a) False (b) True
- 36.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
- 37.Which of these is true of a web browser? (a) answers page requests (b) is where we type code (c) shows pages from the web (d) stores a website’s files
- 38.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
- 39.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
- 40.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
Answer key
- in the head
- Yes
- No
- </i>
- False
- <img>
- shows line numbers
- 3
- <h4>
- False
- <li>
- in the body
- True
- a web server
- contact.html
- in the same tab
- <ul>
- Match report
- a web browser
- the body
- line 1
- True
- 2
- 4
- <h4>
- <li>
- HyperText
- 3
- True
- <h6>
- False
- Welcome!
- 400
- 4
- True
- <li>
- shows pages from the web
- <h2>
- <h1>
- <h4>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids