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 tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
- 2.True or false: HTML on its own can make tables. (a) False (b) True
-
3.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>Hello, world!</p> (a) I love mangoes. (b) The red kite (c) Hello, world! - 4.💬 How does an HTML comment end? (a) --> (b) */ (c) >> (d) //
- 5.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
-
6.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) Contact us (c) maths.html (d) art.html - 7.True or false: a web server saves our .html files. (a) False (b) True
-
8.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> -
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Class 7 Blog (b) Try this poha. (c) body (d) My drawings - 10.True or false: in <img>, width shows if the image fails. (a) True (b) False
-
11.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My pets</p>
<p>Rain today</p> - 12.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
- 13.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
-
14.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in a new tab (b) in the same tab -
15.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> (a) My best friend (b) The red kite (c) Hello, world! (d) Rain today - 16.True or false: HTML on its own can add pictures to a page. (a) False (b) True
-
17.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!
line 2: <h1>My best friend</h1>
line 3: <em>My pets</em> (a) line 1 (b) line 2 (c) line 3 -
18.🔍 Which line is missing its closing tag?
line 1: <small>My pets</small>
line 2: <em>Hello, world!</em>
line 3: <i>Good morning! (a) line 3 (b) line 2 (c) line 1 - 19.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 20.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 21.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
- 22.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 23.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) colours code to help us (d) stores a website’s files
-
24.🔍 One closing tag is missing. Which one?
<i>My best friend
<b>Fun facts</b>
<h2>I love mangoes.</h2> (a) </b> (b) </u> (c) </i> (d) </h2> -
25.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers -
26.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Our school trip</p>
<p>Cricket is fun.</p> - 27.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
- 28.Which of these is true of a web server? (a) shows pages from the web (b) has an address bar (c) is where we type code (d) stores a website’s files
- 29.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 30.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
-
31.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Grapes</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 32.True or false: <ol> is an unordered list. (a) False (b) True
- 33.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
-
34.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) Contact us (b) https://example.com (c) href (d) About us - 35.Which of these has a closing tag? (a) <br> (b) <hr> (c) <input> (d) <h1>
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
- 37.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h6>? (a) <h4> (b) <h2> (c) <h3> (d) <h6>
- 38.True or false: <img> goes in the head. (a) True (b) False
-
39.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>My best friend</p> - 40.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <img>
Answer key
- <h6>
- True
- I love mangoes.
- -->
- <
- https://example.com
- False
- 1
- My drawings
- False
- 1
- a paragraph
- a web browser
- in the same tab
- Rain today
- True
- line 1
- line 3
- True
- has a closing tag
- <li>
- <h1>
- turns HTML into a page
- </i>
- numbers
- 1
- alt
- stores a website’s files
- <a href="about.html">
- <!--
- 2
- False
- on the browser tab
- About us
- <h1>
- <h5>
- <h2>
- False
- 3
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids