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.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<i>Hello, world!</i>
<b>Our school trip (a) </em> (b) </i> (c) </p> (d) </b> - 2.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 3.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
- 4.Which of these is an opening tag? (a) </b> (b) </li> (c) <li> (d) </h1>
- 5.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
- 6.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 1 (d) 6
- 7.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) speed (d) structure
- 8.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 9.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
-
10.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<h2>Hello, world!</h2>
<p>Rain today</p>
<h2>Rain today</h2>
<h2>My best friend</h2> -
11.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in the same tab (b) in a new tab - 12.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) height (c) width (d) src
- 13.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 14.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a calculator (d) a web browser
- 15.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
- 16.True or false: <hr> has a closing tag. (a) True (b) False
- 17.📝 What do we need to write HTML? (a) a paintbrush (b) a microphone (c) a plain text editor (d) a printer
- 18.True or false: <ul> is one item of a list. (a) True (b) False
- 19.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
- 20.True or false: a web browser turns HTML into a page. (a) True (b) False
- 21.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) has an address bar (d) colours code to help us
-
22.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) news.html (b) art.html (c) Visit the site (d) maths.html - 23.Which of these is true of a web server? (a) sends pages over the net (b) opens web pages for us (c) has an address bar (d) shows pages from the web
- 24.🔢 In a basic web page file, which comes first: “<html>” or “</body>”? (a) <html> (b) </body>
-
25.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> - 26.True or false: a web server answers page requests. (a) False (b) True
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>My pets</h4>
<h3>Rain today</h3>
<h3>Hello, world!</h3>
<h2>My best friend</h2> - 28.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 29.📄 Can HTML on its own make tables? (a) Yes (b) No
- 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
-
31.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>The red kite</p> - 32.Which of these goes in the head? (a) <table> (b) <ul> (c) <style> (d) <h1>
- 33.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
-
34.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p> (a) Rain today (b) Our school trip (c) Cricket is fun. - 35.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
-
36.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) quiz.html (c) about.html (d) games.html -
37.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<h2>I love mangoes.</h2>
<h4>My best friend</h4>
<p>My pets</p> - 38.Which of these is an opening tag? (a) </h1> (b) <title> (c) </title> (d) </p>
- 39.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
-
40.🔗 Where does this link open?
<a href="news.html">School news</a> (a) in the same tab (b) in a new tab
Answer key
- </b>
- True
- a line across the page
- <li>
- height
- 1
- structure
- an opening tag
- <h6>
- 2
- in the same tab
- alt
- a web browser
- a web browser
- to describe the image
- False
- a plain text editor
- False
- <li>
- True
- has an address bar
- maths.html
- sends pages over the net
- <html>
- 2
- True
- 5
- <a>
- Yes
- <ol>
- 1
- <style>
- in the body
- Our school trip
- a web server
- quiz.html
- 3
- <title>
- to leave notes
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids