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.True or false: <a> goes in the head. (a) False (b) True
- 2.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h2>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 3.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
-
4.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Hello, world!</h4>
<h2>Hello, world!</h2>
<h2>Fun facts</h2> - 5.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) speed (d) structure
- 6.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 7.True or false: HTML on its own can run a game loop. (a) False (b) True
- 8.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 9.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 10.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </body> (c) </html> (d) <!DOCTYPE html>
-
11.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Our school trip</h2>
<p>Rain today</p> - 12.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) turns HTML into a page (d) sends pages over the net
- 13.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <table> (d) <meta charset="utf-8">
- 14.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
-
15.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>I love mangoes.</h4>
<h4>Hello, world!</h4>
<p>Hello, world!</p> - 16.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
- 17.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) index.html (c) My Hobbies (d) Match report - 19.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) has an address bar (d) stores a website’s files
- 20.📄 Can HTML on its own make headings? (a) Yes (b) No
- 21.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) src (d) width
- 22.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
- 24.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
- 25.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 26.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 27.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
28.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in a new tab (b) in the same tab - 29.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
30.🔗 Where does this link open?
<a href="https://example.com" target="_blank">School news</a> (a) in the same tab (b) in a new tab -
31.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p> - 32.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 33.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
- 34.True or false: <ol> is an ordered list. (a) False (b) True
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
36.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) My best friend (b) Good morning! (c) The red kite (d) Cricket is fun. - 37.📄 Can HTML on its own make tables? (a) Yes (b) No
- 38.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
-
39.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> --> - 40.True or false: a web server shows pages from the web. (a) True (b) False
Answer key
- False
- <h2>
- <!DOCTYPE html>
- 4
- structure
- <h1>
- False
- <h1>
- an attribute
- <!DOCTYPE html>
- 2
- sends pages over the net
- <table>
- to describe the image
- 3
- 1
- a closing tag
- My Hobbies
- has an address bar
- Yes
- alt
- an opening tag
- <
- <li>
- Yes
- False
- True
- in the same tab
- No
- in a new tab
- 2
- Yes
- <h2>
- True
- 50
- Cricket is fun.
- Yes
- href
- 2
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids