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 of these is an empty tag? (a) <b> (b) <title> (c) <input> (d) <p>
- 2.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 4.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype
- 5.True or false: HTML on its own cannot make a form. (a) False (b) True
- 6.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
-
7.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) news.html (c) art.html (d) maths.html - 8.True or false: a web browser colours code to help us. (a) False (b) True
- 9.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 10.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) </small> (d) <small>
-
11.🔍 One closing tag is missing. Which one?
<i>Fun facts
<p>Good morning!</p>
<em>Cricket is fun.</em> (a) </em> (b) </h1> (c) </i> (d) </p> - 12.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
- 13.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
14.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) Play games (b) About us (c) maths.html (d) href - 15.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 16.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h1>
-
17.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>Hello, world!</p> (a) The red kite (b) My pets (c) Hello, world! -
18.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Rain today</h2>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> -
19.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> --> (a) My pets (b) Hello, world! (c) Our school trip (d) The red kite - 20.True or false: a web browser sends pages over the net. (a) True (b) False
- 21.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
22.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Rivers flow</p> - 23.True or false: in <img>, alt names the picture file. (a) True (b) False
-
24.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in the same tab (b) in a new tab - 25.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) <p> (d) </p>
-
26.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>The red kite</p>
<p>Hello, world!</p>
<p>Our school trip</p> (a) Our school trip (b) Hello, world! (c) The red kite (d) Rain today - 27.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 28.Which of these has a closing tag? (a) <hr> (b) <img> (c) <ul> (d) <meta>
- 29.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 30.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 31.True or false: <img> has a closing tag. (a) True (b) False
- 32.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
-
33.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>The red kite</h2>
<p>Our school trip</p> - 34.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
- 35.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 36.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
- 37.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
-
39.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) art.html (b) School news (c) href (d) Art corner - 40.True or false: <ol> lists steps in order. (a) False (b) True
Answer key
- <input>
- Yes
- has a closing tag
- the body
- False
- a code editor
- maths.html
- False
- <ul>
- </small>
- </i>
- Markup
- a closing tag
- Play games
- <a>
- <h1>
- The red kite
- 3
- My pets
- False
- <ol>
- 3
- False
- in the same tab
- </p>
- Rain today
- opens it in a new tab
- <ul>
- has a closing tag
- <ul>
- False
- to describe the image
- 3
- <ol>
- False
- <a href="about.html">
- in the head
- <ol>
- Art corner
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids