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 heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
-
2.🔍 One closing tag is missing. Which one?
<p>My pets
<u>My best friend</u>
<h3>Cricket is fun.</h3> (a) </p> (b) </h3> (c) </u> (d) </strong> - 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
5.🔍 Which line is missing its closing tag?
line 1: <h2>Rain today</h2>
line 2: <i>Good morning!
line 3: <h3>Fun facts</h3> (a) line 1 (b) line 2 (c) line 3 - 6.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
-
8.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 9.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
- 10.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 11.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 12.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 13.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
- 14.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
- 15.True or false: <li> is one item of a list. (a) False (b) True
- 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
-
17.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>Hello, world!</h2>
<p>The red kite</p> -
18.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>The red kite</p>
<p>Cricket is fun.</p> (a) My best friend (b) Hello, world! (c) Cricket is fun. (d) The red kite - 19.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 20.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
- 21.True or false: <input> is an empty tag. (a) True (b) False
- 22.True or false: a web server answers page requests. (a) True (b) False
- 23.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 24.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 25.Which of these has a closing tag? (a) <img> (b) <meta> (c) <hr> (d) <p>
- 26.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
- 27.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
- 28.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
-
29.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Visit the site (c) href (d) Maths fun - 30.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 31.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
-
32.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) art.html (b) news.html (c) maths.html (d) Take the quiz - 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
34.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p> (a) Good morning! (b) The red kite (c) Cricket is fun. -
35.🔍 One closing tag is missing. Which one?
<h1>Rain today
<strong>Cricket is fun.</strong>
<em>Fun facts</em> (a) </p> (b) </strong> (c) </em> (d) </h1> - 36.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) answers page requests (d) saves our .html files
-
37.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) All about me (b) index.html (c) Thanks for visiting. (d) Class 7 Blog -
38.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>Fun facts</p> --> - 39.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 40.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
Answer key
- <h1>
- </p>
- has a closing tag
- has a closing tag
- line 2
- an opening tag
- <!--
- bullets
- -->
- <ol>
- Yes
- has a closing tag
- <a href="about.html">
- <img>
- True
- <h1>
- 2
- Hello, world!
- <ul>
- <head>
- True
- True
- a code editor
- <h5>
- <p>
- width
- the body
- <!DOCTYPE html>
- Visit the site
- to leave notes
- <li>
- maths.html
- Yes
- Cricket is fun.
- </h1>
- answers page requests
- Class 7 Blog
- 1
- True
- </p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids