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) <h1> (b) <h3> (c) <p> (d) <h6>
-
2.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Hello, world!</h2>
<h4>The red kite</h4>
<p>Hello, world!</p> -
3.🔗 Which address opens when you click this link?
<a href="art.html">School news</a> (a) School news (b) quiz.html (c) art.html (d) news.html - 4.True or false: <ul> goes in the body. (a) True (b) False
- 5.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
- 7.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
-
8.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab - 9.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
- 10.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <b>
- 11.True or false: <p> goes in the head. (a) False (b) True
-
12.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) https://example.com (b) contact.html (c) about.html (d) Take the quiz - 13.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
- 14.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 15.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h1>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
-
16.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) news.html (b) href (c) Visit the site (d) Contact us -
17.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) contact.html (b) about.html (c) Take the quiz (d) games.html - 18.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
- 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 20.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <ul> (d) <link rel="stylesheet">
- 22.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
-
23.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>My best friend</p> (a) Our school trip (b) Good morning! (c) Fun facts (d) My best friend -
24.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Guava</li>
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 25.Which of these is an opening tag? (a) <h1> (b) </title> (c) </h1> (d) </b>
-
26.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 27.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 28.True or false: <li> is one item of a list. (a) False (b) True
- 29.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 30.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
- 31.True or false: in <img>, height describes the picture. (a) True (b) False
-
32.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Hello, world! (c) The red kite - 33.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
- 34.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 35.Which of these goes in the head? (a) <h1> (b) <a> (c) <table> (d) <style>
- 36.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
-
37.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <p>The red kite
line 3: <h2>Hello, world!</h2> (a) line 3 (b) line 2 (c) line 1 - 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
-
39.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>My best friend</h2>
<p>My pets</p>
<h2>Good morning!</h2> - 40.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
Answer key
- <h6>
- 3
- art.html
- True
- an opening tag
- to describe the image
- <a href="about.html">
- in the same tab
- <h1>
- <b>
- False
- about.html
- <!DOCTYPE html>
- Yes
- <h1>
- Contact us
- games.html
- a line across the page
- Yes
- an opening tag
- <ul>
- the body
- Good morning!
- 11
- <h1>
- numbers
- 6
- True
- Yes
- a paragraph
- False
- Fun facts
- <!DOCTYPE html>
- True
- <style>
- src
- line 2
- href
- 2
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids