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.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 2.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
-
3.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> (a) Fun facts (b) The red kite (c) Cricket is fun. (d) I love mangoes. -
4.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow</p> -
5.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>Fun facts</p> (a) Our school trip (b) Cricket is fun. (c) My pets (d) Fun facts -
6.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="100"> -
7.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) Take the quiz (c) art.html (d) School news - 8.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
- 9.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
-
10.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 11.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a calculator (d) a paint program
- 12.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
- 13.True or false: a code editor shows line numbers. (a) True (b) False
- 14.Which of these is true of a code editor? (a) shows pages from the web (b) stores a website’s files (c) hosts websites online (d) saves our .html files
- 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
16.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
17.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) maths.html (b) art.html (c) School news (d) news.html - 18.Which of these is true of a web server? (a) saves our .html files (b) has an address bar (c) hosts websites online (d) shows line numbers
- 19.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) stores a website’s files (d) answers page requests
- 20.True or false: HTML on its own cannot make a form. (a) False (b) True
-
21.🔍 Which line is missing its closing tag?
line 1: <em>Hello, world!</em>
line 2: <b>My best friend</b>
line 3: <u>The red kite (a) line 3 (b) line 1 (c) line 2 - 22.Which of these has a closing tag? (a) <meta> (b) <li> (c) <input> (d) <br>
- 23.True or false: a web browser turns HTML into a page. (a) False (b) True
- 24.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
- 25.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) My Hobbies (c) Thanks for visiting. (d) Easy snacks -
27.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> - 28.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 29.Which of these is true of a code editor? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) shows pages from the web
- 30.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
31.🔍 Which line is missing its closing tag?
line 1: <b>My pets
line 2: <h1>My best friend</h1>
line 3: <h3>Our school trip</h3> (a) line 1 (b) line 3 (c) line 2 - 32.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
- 33.True or false: <meta> is an empty tag. (a) False (b) True
- 34.Which of these is an opening tag? (a) <p> (b) </h1> (c) </p> (d) </li>
- 35.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 36.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
- 37.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) colours code to help us
- 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
-
39.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> --> - 40.True or false: a code editor sends pages over the net. (a) True (b) False
Answer key
- an empty tag
- <h6>
- Fun facts
- 2
- Our school trip
- 100
- School news
- <h1>
- <
- 3
- a web browser
- <ol>
- True
- saves our .html files
- has a closing tag
- 4
- maths.html
- hosts websites online
- shows line numbers
- False
- line 3
- <li>
- True
- width
- 1
- Easy snacks
- 2
- True
- shows line numbers
- Yes
- line 1
- <li>
- True
- <p>
- No
- -->
- turns HTML into a page
- <img>
- 1
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids