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.🔍 One closing tag is missing. Which one?
<h2>Fun facts</h2>
<p>My pets</p>
<strong>Hello, world! (a) </strong> (b) </h1> (c) </h2> (d) </p> - 2.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) is where we type code (d) hosts websites online
-
3.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p> (a) Rain today (b) Good morning! (c) I love mangoes. -
4.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Orange</li>
</ul> - 5.True or false: in <img>, src is read by screen readers. (a) False (b) True
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 7.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 8.True or false: <li> lists things in any order. (a) True (b) False
- 9.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
- 10.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) turns HTML into a page (d) saves our .html files
-
11.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Our school trip</p>
<h4>I love mangoes.</h4>
<h3>Fun facts</h3>
<h4>Our school trip</h4> - 12.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
- 13.💬 Does the browser show comments on the page? (a) Yes (b) No
- 14.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
-
15.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Welcome! (c) body (d) Space Facts - 16.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 17.Which of these goes in the head? (a) <h1> (b) <ul> (c) <table> (d) <link rel="stylesheet">
- 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
19.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>Fun facts</p> (a) Fun facts (b) Hello, world! (c) Our school trip -
20.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>My best friend</p>
<p>Cricket is fun.</p> (a) My best friend (b) Fun facts (c) Cricket is fun. (d) I love mangoes. - 21.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 23.True or false: HTML on its own can make links to pages. (a) False (b) True
- 24.Which of these is true of a code editor? (a) stores a website’s files (b) opens web pages for us (c) shows line numbers (d) shows pages from the web
- 25.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 26.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
-
27.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>My pets</h4>
<p>Rain today</p>
<h2>I love mangoes.</h2> - 28.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
-
29.🔍 Which line is missing its closing tag?
line 1: <h1>Hello, world!</h1>
line 2: <h2>Rain today
line 3: <strong>Cricket is fun.</strong> (a) line 2 (b) line 3 (c) line 1 -
30.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) quiz.html (b) news.html (c) Maths fun (d) art.html -
31.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> --> - 32.True or false: <h1> has a closing tag. (a) False (b) True
- 33.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 34.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
- 35.True or false: <p> has a closing tag. (a) False (b) True
- 36.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
- 37.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
-
38.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) Play games (b) news.html (c) art.html (d) maths.html -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="400"> (a) Our school bus (b) The full moon (c) moon.png (d) width - 40.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
Answer key
- </strong>
- hosts websites online
- Good morning!
- 2
- False
- 250
- a web server
- False
- <!DOCTYPE html>
- saves our .html files
- 4
- opens it in a new tab
- No
- -->
- Welcome!
- a web server
- <link rel="stylesheet">
- in the head
- Hello, world!
- I love mangoes.
- <h6>
- <h1>
- True
- shows line numbers
- <ul>
- </u>
- 3
- <h6>
- line 2
- art.html
- 3
- True
- <ol>
- an attribute
- True
- <!DOCTYPE html>
- <h1>
- maths.html
- The full moon
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids