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.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
- 2.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
- 3.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
-
4.🔗 Where does this link open?
<a href="contact.html">Visit the site</a> (a) in the same tab (b) in a new tab - 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <table>
-
6.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>My pets</h3>
<p>Cricket is fun.</p>
<h2>Hello, world!</h2>
<p>Good morning!</p> -
7.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> - 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) A tiger asleep (b) width (c) An old fort (d) fort.jpg -
10.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>My best friend</h4>
<p>Rain today</p>
<p>The red kite</p> - 11.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Cricket Club (c) All about me (d) body - 13.True or false: <table> goes in the head. (a) True (b) False
-
14.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> - 15.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
- 16.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
-
18.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) about.html (b) Take the quiz (c) quiz.html (d) games.html - 19.True or false: a code editor has an address bar. (a) True (b) False
-
20.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<h4>The red kite</h4> - 21.True or false: in <img>, height names the picture file. (a) True (b) False
- 22.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 23.True or false: HTML on its own can make bullet lists. (a) False (b) True
-
24.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>I love mangoes.</p>
<h4>Good morning!</h4> - 25.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
26.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) quiz.html (d) href -
27.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) news.html (b) maths.html (c) Contact us (d) art.html - 28.💬 Does the browser show comments on the page? (a) Yes (b) No
- 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
- 30.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
-
31.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers - 32.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
- 33.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) alt (d) height
- 34.Which of these is an opening tag? (a) </h1> (b) <body> (c) </title> (d) </p>
- 35.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 37.📄 Can HTML on its own make a form? (a) No (b) Yes
-
38.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Roses are red<br>Sky is blue</p> -
39.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.
line 2: <u>My best friend</u>
line 3: <h1>Good morning!</h1> (a) line 3 (b) line 2 (c) line 1 -
40.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Rivers flow</p>
Answer key
- opens it in a new tab
- <h6>
- 1
- in the same tab
- <table>
- 3
- 2
- No
- An old fort
- 2
- <ul>
- All about me
- False
- 1
- <li>
- False
- <ol>
- quiz.html
- False
- 2
- False
- <!DOCTYPE html>
- True
- 2
- No
- Take the quiz
- maths.html
- No
- <h1>
- <!--
- bullets
- <!DOCTYPE html>
- height
- <body>
- <h6>
- a web browser
- Yes
- 4
- line 1
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids