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 words do you click on?
<a href="news.html">Take the quiz</a> (a) href (b) Take the quiz (c) news.html (d) Play games -
2.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400"> -
3.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> (a) Fun facts (b) Hello, world! (c) My pets (d) Our school trip - 4.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 5.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
6.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Orange</li>
</ol> (a) bullets (b) numbers - 7.True or false: a web server answers page requests. (a) True (b) False
-
8.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<!-- <p>My best friend</p> --> -
9.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Mango</li>
<li>Papaya</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 10.True or false: in <img>, alt describes the picture. (a) True (b) False
-
11.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My pets</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Rain today</p>
<p>The red kite</p> - 12.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 13.True or false: <li> lists things in any order. (a) False (b) True
- 14.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
15.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
16.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
</ul> -
17.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.</small>
<p>The red kite
<u>I love mangoes.</u> (a) </u> (b) </small> (c) </h2> (d) </p> -
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Hello, world!</h2>
<h2>My pets</h2>
<h2>Fun facts</h2>
<p>My best friend</p> - 19.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) width (b) Birthday cake (c) cake.jpg (d) A happy dog -
21.📋 What number does the browser show next to “Orange”?
<ol start="2">
<li>Litchi</li>
<li>Guava</li>
<li>Orange</li>
</ol> -
22.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) href (b) Art corner (c) School news (d) maths.html -
23.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> -
24.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> - 25.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
- 26.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
- 27.🔗 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">
-
28.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<p>Our school trip
<h2>Cricket is fun.</h2> (a) </small> (b) </h2> (c) </p> (d) </h3> -
29.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> - 30.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
- 31.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
- 32.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) opens web pages for us (d) shows line numbers
- 33.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
34.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>My best friend</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<p>My pets</p> - 35.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
-
36.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>Our school trip</p> (a) Fun facts (b) Our school trip (c) I love mangoes. -
37.🔍 One closing tag is missing. Which one?
<strong>Rain today</strong>
<h1>My best friend
<u>Hello, world!</u> (a) </u> (b) </strong> (c) </small> (d) </h1> - 38.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
- 39.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
-
40.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>I love mangoes.</p>
<h2>Good morning!</h2>
Answer key
- Take the quiz
- 400
- Our school trip
- <h1>
- an empty tag
- numbers
- True
- 1
- 6
- True
- 6
- <ul>
- False
- <ul>
- bullets
- 2
- </p>
- 4
- 6
- Birthday cake
- 4
- Art corner
- 200
- 2
- <a>
- a line across the page
- <a href="about.html">
- </p>
- 3
- on the browser tab
- <h1>
- opens web pages for us
- in the body
- 5
- opens it in a new tab
- I love mangoes.
- </h1>
- a code editor
- <!DOCTYPE html>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids