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 is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
-
2.🔗 Where does this link open?
<a href="games.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
3.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>My best friend</h4>
<p>Fun facts</p>
<h3>I love mangoes.</h3> - 4.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 5.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 6.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) shows line numbers
- 7.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 8.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
- 9.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) <h1> (d) </h1>
- 10.True or false: in <img>, width describes the picture. (a) False (b) True
-
11.🔍 One closing tag is missing. Which one?
<small>My best friend</small>
<em>The red kite</em>
<h1>Rain today (a) </b> (b) </small> (c) </h1> (d) </em> - 12.True or false: HTML on its own cannot keep a high score. (a) True (b) False
-
13.🔍 One closing tag is missing. Which one?
<h1>Cricket is fun.
<i>I love mangoes.</i>
<em>Fun facts</em> (a) </h2> (b) </i> (c) </h1> (d) </em> - 14.Which of these is a closing tag? (a) <p> (b) </title> (c) <body> (d) <h1>
-
15.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip</h3>
line 2: <b>Fun facts
line 3: <small>Rain today</small> (a) line 2 (b) line 3 (c) line 1 - 16.True or false: a web server answers page requests. (a) False (b) True
-
17.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) about.html (b) quiz.html (c) games.html (d) Visit the site - 18.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
19.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<p>My best friend</p>
<h2>My pets</h2>
<h2>Fun facts</h2>
<h2>Good morning!</h2> - 20.True or false: <li> has a closing tag. (a) True (b) False
- 21.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
- 22.Which of these is a closing tag? (a) <h1> (b) </body> (c) <b> (d) <li>
- 23.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
- 24.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) colours code to help us
- 25.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.Which of these is true of a code editor? (a) turns HTML into a page (b) answers page requests (c) opens web pages for us (d) shows line numbers
- 27.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
28.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) Our school trip (b) My pets (c) The red kite -
29.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> -
30.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>My pets</h2>
<h2>Hello, world!</h2>
<p>My best friend</p>
<p>Hello, world!</p> -
31.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Banana</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 32.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) </i> (d) <i>
-
33.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) href (b) Contact us (c) About us (d) https://example.com -
34.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<strong>The red kite
<i>My pets</i> (a) </b> (b) </strong> (c) </i> (d) </em> -
35.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Roses are red</p> - 36.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
37.🔗 Which words do you click on?
<a href="maths.html">Contact us</a> (a) maths.html (b) Contact us (c) href (d) Visit the site - 38.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
39.🔍 One closing tag is missing. Which one?
<h3>Hello, world!</h3>
<p>My pets
<i>My best friend</i> (a) </p> (b) </i> (c) </h2> (d) </h3> - 40.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
Answer key
- </em>
- in a new tab
- 3
- False
- <a>
- shows line numbers
- on the browser tab
- an attribute
- </h1>
- False
- </h1>
- True
- </h1>
- </title>
- line 2
- True
- quiz.html
- <ol>
- 2
- True
- starts a new line
- </body>
- <h6>
- stores a website’s files
- a closing tag
- shows line numbers
- <!DOCTYPE html>
- Our school trip
- 3
- 3
- 4
- </i>
- About us
- </strong>
- 3
- a web browser
- Contact us
- <h6>
- </p>
- <a href="about.html">
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids