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>Our school trip</h1>
<h2>Hello, world!</h2>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Fun facts</p> - 2.True or false: a web server sends pages over the net. (a) True (b) False
-
3.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) art.html (d) maths.html -
4.🔍 Which line is missing its closing tag?
line 1: <h1>Rain today
line 2: <u>Good morning!</u>
line 3: <b>I love mangoes.</b> (a) line 3 (b) line 1 (c) line 2 - 5.True or false: in <img>, alt describes the picture. (a) True (b) False
-
6.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<p>My pets</p>
<p>Fun facts</p> (a) Cricket is fun. (b) Our school trip (c) Fun facts (d) My pets - 7.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
-
9.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> -
10.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Rain today</p>
<p>The red kite</p> - 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 12.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
-
13.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<h2>My best friend</h2> -
14.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
15.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) Fun facts (b) Our school trip (c) Rain today (d) Hello, world! - 16.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
- 17.Which of these is a closing tag? (a) </title> (b) <body> (c) <li> (d) <h1>
- 18.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 19.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
- 20.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Here is my best one. (c) Planets (d) index.html -
22.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<p>Our school trip</p> -
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> - 24.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
- 25.True or false: a web browser sends pages over the net. (a) True (b) False
- 26.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 27.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h3>
-
28.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>My pets</p> - 29.True or false: in <img>, width is read by screen readers. (a) True (b) False
- 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
-
31.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> (a) My best friend (b) Fun facts (c) Rain today (d) I love mangoes. - 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 33.Which of these is true of a web server? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) stores a website’s files
-
34.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab -
35.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<p>Hello, world!</p>
<p>Fun facts</p> (a) Fun facts (b) Hello, world! (c) Rain today (d) Cricket is fun. -
36.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 37.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
- 38.True or false: <table> goes in the body. (a) False (b) True
-
39.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<p>I love mangoes.</p> - 40.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
Answer key
- 2
- True
- maths.html
- line 1
- True
- Cricket is fun.
- <li>
- tags
- 3
- 1
- Yes
- alt
- 2
- 300
- Fun facts
- the body
- </title>
- 6
- -->
- </small>
- Cricket Club
- 2
- 4
- <a href="about.html">
- False
- <ul>
- <h6>
- 2
- False
- <h1>
- My best friend
- <a>
- stores a website’s files
- in the same tab
- Cricket is fun.
- in a new tab
- <li>
- True
- 3
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids