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.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 2.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
- 3.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 4.🔗 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
- 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 6.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <title> (d) <table>
- 7.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
- 8.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 9.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <table> (d) <a>
- 10.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
-
11.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) My Hobbies (b) Mars is red. (c) My drawings (d) index.html - 12.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <title> (d) <style>
-
13.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) news.html (b) Take the quiz (c) Play games (d) href -
14.🔍 One closing tag is missing. Which one?
<em>Hello, world!
<p>Rain today</p>
<h1>I love mangoes.</h1> (a) </p> (b) </em> (c) </h1> (d) </strong> - 15.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
16.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Good morning! (b) The red kite (c) Hello, world! -
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) Cricket Club (c) I like to read. (d) body - 18.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 19.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
-
20.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) School news (b) art.html (c) Art corner (d) href - 21.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
22.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 23.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
- 24.True or false: a code editor sends pages over the net. (a) True (b) False
-
25.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) contact.html (b) Maths fun (c) https://example.com (d) about.html - 26.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) shows line numbers
-
27.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>The red kite</p> (a) The red kite (b) Hello, world! (c) Good morning! - 28.True or false: <title> is an empty tag. (a) False (b) True
- 29.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
30.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) href (b) Maths fun (c) news.html (d) Visit the site - 31.True or false: <img> is an empty tag. (a) True (b) False
- 32.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
- 33.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
-
34.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> - 35.🌍 Which program shows a web page to us? (a) a web browser (b) a paint program (c) a calculator (d) a music player
- 36.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 37.Which of these has a closing tag? (a) <input> (b) <meta> (c) <hr> (d) <ul>
- 38.Which of these is a closing tag? (a) </h1> (b) <li> (c) <h1> (d) <body>
- 39.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
- 40.Which of these is an opening tag? (a) <p> (b) </li> (c) </h1> (d) </p>
Answer key
- an opening tag
- alt
- No
- opens it in a new tab
- <a href="about.html">
- <table>
- <li>
- Yes
- <meta charset="utf-8">
- <h6>
- My Hobbies
- <img>
- Take the quiz
- </em>
- in the head
- The red kite
- Welcome!
- has a closing tag
- <h1>
- Art corner
- Yes
- bullets
- </h2>
- False
- about.html
- stores a website’s files
- Good morning!
- False
- an opening tag
- Visit the site
- True
- a code editor
- <h1>
- 3
- a web browser
- in the body
- <ul>
- </h1>
- <
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids