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 line is missing its closing tag?
line 1: <small>Cricket is fun.
line 2: <h1>Fun facts</h1>
line 3: <p>Hello, world!</p> (a) line 3 (b) line 1 (c) line 2 - 2.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 3.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
-
4.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="200"> (a) kite.png (b) fort.jpg (c) An old fort (d) tiger.jpg -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep - 6.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
-
7.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>The red kite</p> (a) The red kite (b) My pets (c) I love mangoes. - 8.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
- 9.Which of these is a closing tag? (a) </li> (b) <li> (c) <body> (d) <h1>
-
10.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <strong>Our school trip</strong>
line 3: <u>Fun facts (a) line 1 (b) line 2 (c) line 3 - 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
- 12.💬 How does an HTML comment start? (a) /* (b) # (c) // (d) <!--
- 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 14.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) has an address bar (d) stores a website’s files
-
15.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) art.html (d) news.html - 16.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) shows line numbers (d) stores a website’s files
- 17.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
-
18.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 19.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
-
20.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) href (c) About us (d) art.html - 21.Which of these is true of a web browser? (a) shows pages from the web (b) answers page requests (c) hosts websites online (d) colours code to help us
-
22.📋 What number does the browser show next to “Orange”?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
</ol> -
23.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) quiz.html (d) art.html - 24.Which of these is true of a web server? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows line numbers
- 25.True or false: a web browser is where we type code. (a) False (b) True
- 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
-
27.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue</p> -
28.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 29.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="200"> - 31.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 32.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 33.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 34.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) </body>
-
35.🔍 Which line is missing its closing tag?
line 1: <p>Hello, world!</p>
line 2: <h1>My pets
line 3: <h3>My best friend</h3> (a) line 3 (b) line 2 (c) line 1 -
36.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p>
<p>My best friend</p> (a) Good morning! (b) My best friend (c) Hello, world! (d) Cricket is fun. -
37.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) Play games (b) href (c) about.html (d) About us -
38.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) About us (c) href (d) maths.html - 39.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h3> (d) <h4>
-
40.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) games.html (b) Maths fun (c) Visit the site (d) href
Answer key
- line 1
- <ul>
- <
- fort.jpg
- A tiger asleep
- <ol>
- My pets
- -->
- </li>
- line 3
- <a href="about.html">
- <!--
- has a closing tag
- stores a website’s files
- maths.html
- shows line numbers
- <h6>
- in a new tab
- Yes
- About us
- shows pages from the web
- 3
- art.html
- stores a website’s files
- False
- <h5>
- 2
- 2
- opens it in a new tab
- 200
- No
- <a>
- <ul>
- <!DOCTYPE html>
- line 2
- Hello, world!
- Play games
- Play games
- <h6>
- Visit the site
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids