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 part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
- 2.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
-
3.🔗 Where does this link open?
<a href="art.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab - 4.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </body> (c) <html> (d) </html>
-
5.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) About us (b) art.html (c) quiz.html (d) news.html -
6.🔍 Which line is missing its closing tag?
line 1: <h2>Rain today</h2>
line 2: <b>Good morning!
line 3: <i>Cricket is fun.</i> (a) line 2 (b) line 1 (c) line 3 -
7.🔍 Which line is missing its closing tag?
line 1: <strong>Cricket is fun.
line 2: <h2>Our school trip</h2>
line 3: <em>The red kite</em> (a) line 1 (b) line 3 (c) line 2 -
8.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p> - 9.True or false: in <img>, alt describes the picture. (a) False (b) True
- 10.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
- 11.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
12.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) dog.jpg (b) A happy dog (c) moon.png (d) bus.jpg -
13.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) Take the quiz (b) quiz.html (c) School news (d) href -
14.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>My best friend</p>
<h2>The red kite</h2>
<p>The red kite</p> -
15.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> - 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
- 17.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
- 18.True or false: <h1> is an empty tag. (a) False (b) True
-
19.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>The red kite</p> - 20.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 21.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
-
22.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <strong>Fun facts</strong>
line 3: <i>My pets (a) line 2 (b) line 3 (c) line 1 - 23.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 24.True or false: in <img>, width tells which image to load. (a) False (b) True
-
25.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) contact.html (b) Contact us (c) about.html (d) games.html - 26.True or false: in <img>, alt is read by screen readers. (a) True (b) False
-
27.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>My best friend</p>
<p>Good morning!</p> (a) My best friend (b) Good morning! (c) My pets - 28.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 29.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .mp3 (d) .html
-
30.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<h2>Rain today</h2> - 31.Which of these is true of a web browser? (a) is where we type code (b) turns HTML into a page (c) stores a website’s files (d) saves our .html files
-
32.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p> (a) My pets (b) The red kite (c) My best friend (d) Hello, world! - 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 34.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h2>
-
35.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Orange</li>
<li>Banana</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 36.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
-
37.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 38.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 40.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
Answer key
- the body
- 6
- in a new tab
- </html>
- art.html
- line 2
- line 1
- 1
- True
- <a>
- a web browser
- dog.jpg
- School news
- 3
- 3
- opens it in a new tab
- <h1>
- False
- 3
- <ul>
- <ul>
- line 3
- <h6>
- False
- games.html
- True
- My pets
- a web server
- .html
- 2
- turns HTML into a page
- Hello, world!
- No
- <h6>
- 6
- element
- in a new tab
- <a href="about.html">
- has a closing tag
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids