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 text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Cricket is fun. (c) The red kite - 2.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
- 3.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
- 4.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
-
5.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<p>Rain today</p>
<!-- <p>My best friend</p> --> (a) My pets (b) Our school trip (c) My best friend (d) Rain today - 6.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
- 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
- 8.Which of these goes in the body? (a) <table> (b) <title> (c) <style> (d) <link rel="stylesheet">
-
9.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 10.Which of these is true of a web browser? (a) answers page requests (b) saves our .html files (c) opens web pages for us (d) is where we type code
- 11.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
- 12.True or false: in <img>, src names the picture file. (a) False (b) True
- 13.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
-
14.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) art.html (c) news.html (d) Visit the site - 15.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 16.True or false: <input> has a closing tag. (a) True (b) False
-
17.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) about.html (b) games.html (c) Play games (d) contact.html -
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) My Hobbies (c) body (d) Welcome! - 19.True or false: <a> goes in the body. (a) False (b) True
- 20.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
- 21.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
- 22.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
- 23.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
24.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) Fun facts (b) Cricket is fun. (c) Hello, world! -
25.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>My best friend</p> --> -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) width (b) The full moon (c) moon.png (d) Our school bus - 27.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
-
28.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> (a) Cricket is fun. (b) My best friend (c) Hello, world! - 29.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <br>
- 30.True or false: HTML on its own can show paragraphs. (a) True (b) False
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) index.html - 32.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
- 33.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
34.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Papaya</li>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
</ol> - 35.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
- 36.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
-
38.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<!-- <p>The red kite</p> --> - 39.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) saves our .html files (d) sends pages over the net
-
40.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
</ol>
Answer key
- My best friend
- height
- src
- <li>
- My best friend
- a web browser
- <h4>
- <table>
- 2
- opens web pages for us
- </strong>
- True
- a web server
- art.html
- an opening tag
- False
- games.html
- Welcome!
- True
- on the browser tab
- <!DOCTYPE html>
- 6
- <ul>
- Hello, world!
- 1
- The full moon
- to leave notes
- Hello, world!
- <p>
- True
- My Hobbies
- <h1>
- in the body
- 6
- <li>
- Yes
- opens it in a new tab
- 1
- sends pages over the net
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids