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.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 2.Which of these is an opening tag? (a) </b> (b) </li> (c) <body> (d) </p>
- 3.True or false: in <img>, alt describes the picture. (a) False (b) True
-
4.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) news.html (b) About us (c) Play games (d) href - 5.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
- 6.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
7.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Good morning!</p> - 8.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 9.True or false: in <img>, src tells which image to load. (a) True (b) False
-
10.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <h3>Hello, world!</h3>
line 3: <small>Fun facts (a) line 2 (b) line 3 (c) line 1 - 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 12.Which of these is a closing tag? (a) <li> (b) <b> (c) </li> (d) <h1>
- 13.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="50"> - 15.Which of these goes in the head? (a) <style> (b) <p> (c) <a> (d) <img>
- 16.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
- 17.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
-
18.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png -
19.🔗 Where does this link open?
<a href="news.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 20.True or false: <ul> is an unordered list. (a) False (b) True
- 21.True or false: <ol> lists things in any order. (a) False (b) True
- 22.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
-
23.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) Maths fun (b) news.html (c) maths.html (d) art.html - 24.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 25.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
- 26.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
-
27.🔍 Which line is missing its closing tag?
line 1: <em>Hello, world!</em>
line 2: <h2>My pets</h2>
line 3: <b>Rain today (a) line 2 (b) line 1 (c) line 3 - 28.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) an element name (d) a comment
- 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 30.📄 Can HTML on its own make headings? (a) No (b) Yes
- 31.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 32.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) </body>
-
33.🔗 Where does this link open?
<a href="about.html" target="_blank">Maths fun</a> (a) in the same tab (b) in a new tab - 34.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
-
35.🔗 Which address opens when you click this link?
<a href="maths.html">School news</a> (a) art.html (b) School news (c) maths.html (d) news.html -
36.🔗 Where does this link open?
<a href="about.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 37.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 38.True or false: <b> is an empty tag. (a) False (b) True
- 39.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) saves our .html files (d) colours code to help us
- 40.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- in the head
- <body>
- True
- Play games
- <h1>
- Yes
- 4
- <ul>
- True
- line 3
- <a href="about.html">
- </li>
- Markup
- 50
- <style>
- <h1>
- href
- dog.jpg
- in a new tab
- True
- False
- alt
- maths.html
- a web browser
- <!DOCTYPE html>
- <
- line 3
- an attribute
- <h4>
- Yes
- <h4>
- <!DOCTYPE html>
- in a new tab
- a paragraph
- maths.html
- in a new tab
- an opening tag
- False
- turns HTML into a page
- an empty tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids