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 headings are in this code?
<h1>Good morning!</h1>
<p>I love mangoes.</p>
<h3>My pets</h3> - 2.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
-
3.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Good morning! (c) Our school trip (d) Rain today -
4.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) The full moon (b) fort.jpg (c) bus.jpg (d) moon.png - 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <h1> (d) <meta charset="utf-8">
-
6.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
</ol> -
7.🔗 Which address opens when you click this link?
<a href="art.html">Take the quiz</a> (a) quiz.html (b) Take the quiz (c) art.html (d) news.html - 8.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
- 9.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 10.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<h4>My best friend</h4>
<p>Fun facts</p>
<h3>Rain today</h3> - 12.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
-
13.🔍 One closing tag is missing. Which one?
<p>Hello, world!</p>
<em>My pets
<h2>Good morning!</h2> (a) </u> (b) </h2> (c) </em> (d) </p> - 14.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>Our school trip</h4>
<h4>Fun facts</h4>
<h2>The red kite</h2> -
16.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p> -
17.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> - 18.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) hosts websites online (d) shows pages from the web
-
19.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Fun facts</h2>
<p>Good morning!</p>
<h2>The red kite</h2>
<h2>Our school trip</h2> - 20.Which of these is an opening tag? (a) </title> (b) </h1> (c) </body> (d) <p>
- 21.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
-
22.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My best friend</h2>
<p>Hello, world!</p>
<p>I love mangoes.</p> -
23.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Litchi</li>
</ul> -
24.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<h2>My pets</h2> -
25.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Cricket is fun.</p>
<h3>My best friend</h3>
<h2>My pets</h2> -
26.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) news.html - 27.💬 Does the browser show comments on the page? (a) No (b) Yes
- 28.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 29.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 30.True or false: HTML on its own cannot run a game loop. (a) False (b) True
- 31.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 32.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) <h3/> (d) </h3>
- 33.🔍 Which is the odd one out? (a) saves our .html files (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
- 34.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
- 35.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
- 37.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
38.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) Art corner (b) href (c) School news (d) news.html -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite - 40.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <p> (d) <style>
Answer key
- 2
- <h6>
- Our school trip
- moon.png
- <h1>
- 3
- art.html
- <!DOCTYPE html>
- <ul>
- has a closing tag
- 3
- alt
- </em>
- No
- 4
- 3
- 1
- hosts websites online
- 2
- <p>
- a web browser
- 3
- 2
- 3
- 3
- Take the quiz
- No
- -->
- a web server
- True
- a web server
- </h3>
- saves our .html files
- <h6>
- in the head
- <h6>
- 6
- Art corner
- A tiger asleep
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids