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.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
- 2.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) sends pages over the net (d) shows pages from the web
- 3.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
- 4.Which of these is an opening tag? (a) </h1> (b) </b> (c) </li> (d) <li>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Stars shine<br>Kites fly high</p> - 6.True or false: <ol> goes inside ul or ol. (a) False (b) True
- 7.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) </strong> (c) <\strong> (d) <strong/>
-
8.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in a new tab (b) in the same tab - 9.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the body (d) the title
- 10.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
- 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 12.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 13.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
- 14.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h4>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
-
15.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Our school trip</h3>
<p>Cricket is fun.</p>
<p>Hello, world!</p> - 16.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) is where we type code (d) answers page requests
- 17.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width - 19.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg -
21.📋 What number does the browser show next to “Banana”?
<ol start="9">
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 22.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
24.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) fort.jpg (c) moon.png (d) The full moon - 25.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
-
26.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) quiz.html (b) Contact us (c) news.html (d) art.html - 27.Which of these is a closing tag? (a) <p> (b) </p> (c) <h1> (d) <body>
-
28.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Hello, world! (b) Cricket is fun. (c) The red kite - 29.True or false: HTML on its own can run a game loop. (a) False (b) True
- 30.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
-
31.🔗 Where does this link open?
<a href="contact.html">About us</a> (a) in a new tab (b) in the same tab - 32.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
- 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
34.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>Cricket is fun.</h2>
<h2>Our school trip</h2>
<h4>My best friend</h4>
<p>I love mangoes.</p> -
35.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) https://example.com (b) Maths fun (c) about.html (d) contact.html - 36.True or false: a web browser sends pages over the net. (a) True (b) False
- 37.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) saves our .html files (d) opens web pages for us
- 38.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
-
39.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<h3>Good morning!</h3>
<p>My pets</p> - 40.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
Answer key
- opens it in a new tab
- shows pages from the web
- 6
- <li>
- 4
- False
- </strong>
- in the same tab
- the body
- a web server
- No
- <ul>
- to leave notes
- <h6>
- 2
- is where we type code
- <head>
- A tiger asleep
- a code editor
- An old fort
- 10
- a web server
- an opening tag
- moon.png
- Yes
- art.html
- </p>
- The red kite
- False
- <ul>
- in the same tab
- <h6>
- an empty tag
- 4
- about.html
- False
- saves our .html files
- <
- 2
- element
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids