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.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Our school trip</h2>
<h2>Our school trip</h2> -
2.🔗 Which address opens when you click this link?
<a href="maths.html">About us</a> (a) art.html (b) news.html (c) maths.html (d) About us - 3.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) has an address bar
-
5.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
6.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
7.🔗 Where does this link open?
<a href="quiz.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
8.🔍 Which line is missing its closing tag?
line 1: <small>My pets
line 2: <u>Good morning!</u>
line 3: <b>Hello, world!</b> (a) line 1 (b) line 3 (c) line 2 - 9.Which of these is a closing tag? (a) <li> (b) <b> (c) </title> (d) <h1>
- 10.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
- 11.Which of these is a closing tag? (a) <p> (b) <h1> (c) </h1> (d) <b>
-
12.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Fun facts</p>
<p>Good morning!</p> - 13.True or false: <ul> goes in the head. (a) False (b) True
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
-
15.🔍 One closing tag is missing. Which one?
<strong>My pets</strong>
<h2>Good morning!
<p>Rain today</p> (a) </h2> (b) </strong> (c) </p> (d) </small> - 16.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 17.True or false: a web browser has an address bar. (a) False (b) True
- 18.True or false: <ul> shows bullet points. (a) False (b) True
- 19.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <\small> (d) <small>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg - 21.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) colours code to help us (d) stores a website’s files
- 22.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 23.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
-
24.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Sky is blue<br>Stars shine<br>Kites fly high</p> -
25.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Litchi</li>
</ol> - 26.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
-
27.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p> - 28.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
-
29.🔗 Which words do you click on?
<a href="maths.html">About us</a> (a) Contact us (b) maths.html (c) About us (d) href -
30.🔍 Which line is missing its closing tag?
line 1: <p>Fun facts
line 2: <small>Hello, world!</small>
line 3: <b>My pets</b> (a) line 2 (b) line 3 (c) line 1 - 31.📄 Can HTML on its own make headings? (a) Yes (b) No
- 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
- 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
- 34.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 35.Which of these is an opening tag? (a) <b> (b) </title> (c) </p> (d) </h1>
- 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h3>
- 37.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 38.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
40.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Fun facts</p>
<p>Hello, world!</p>
Answer key
- 1
- maths.html
- <
- shows line numbers
- 4
- bullets
- in a new tab
- line 1
- </title>
- <h6>
- </h1>
- 1
- False
- <h1>
- </h2>
- False
- True
- True
- </small>
- Birthday cake
- opens web pages for us
- height
- alt
- 5
- 3
- href
- 2
- a web browser
- About us
- line 1
- Yes
- <!DOCTYPE html>
- <a href="about.html">
- to leave notes
- <b>
- <h5>
- an opening tag
- in the body
- <ul>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids