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 is the closing tag for <p>? (a) <p/> (b) <p> (c) <\p> (d) </p>
- 2.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 3.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 4.Which of these is true of a web browser? (a) is where we type code (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
- 5.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
- 6.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
- 7.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
8.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<p>Fun facts
<strong>Our school trip</strong> (a) </i> (b) </p> (c) </em> (d) </strong> -
9.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) href (b) Art corner (c) Maths fun (d) art.html -
10.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!
line 2: <h2>Rain today</h2>
line 3: <h3>Good morning!</h3> (a) line 1 (b) line 2 (c) line 3 -
11.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) The red kite (c) I love mangoes. - 12.🔗 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
- 13.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
-
14.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) Play games (b) About us (c) https://example.com (d) href - 15.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h6>
- 16.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
-
17.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <small>My pets</small>
line 3: <u>I love mangoes. (a) line 3 (b) line 1 (c) line 2 - 18.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
19.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.</h2>
line 2: <small>Cricket is fun.
line 3: <strong>The red kite</strong> (a) line 1 (b) line 3 (c) line 2 -
20.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Our school trip</p> (a) My best friend (b) Our school trip (c) Rain today - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
- 22.Which of these has a closing tag? (a) <img> (b) <meta> (c) <b> (d) <br>
-
23.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Orange</li>
</ul> - 24.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
25.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> - 26.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
-
27.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Rain today</h2>
<p>Rain today</p>
<p>The red kite</p>
<p>Our school trip</p> - 28.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
-
29.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> (a) My pets (b) Cricket is fun. (c) Our school trip -
30.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Good morning!</p>
<p>My pets</p> -
31.🔍 One closing tag is missing. Which one?
<h3>Fun facts
<strong>My pets</strong>
<h1>My best friend</h1> (a) </strong> (b) </h3> (c) </h1> (d) </b> - 32.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </head> (c) </body> (d) </html>
-
33.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) https://example.com (b) art.html (c) Contact us (d) maths.html - 34.True or false: HTML on its own can add pictures to a page. (a) True (b) False
-
35.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) Contact us (b) https://example.com (c) href (d) About us - 36.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
- 37.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 38.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h3> (b) <h1> (c) <h5> (d) <h6>
- 39.True or false: <img> has a closing tag. (a) True (b) False
- 40.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b/> (d) <b>
Answer key
- </p>
- <ol>
- <ul>
- turns HTML into a page
- <a href="about.html">
- HyperText
- in the body
- </p>
- Maths fun
- line 1
- Hello, world!
- opens it in a new tab
- <ol>
- Play games
- <h1>
- an attribute
- line 3
- an opening tag
- line 2
- Rain today
- No
- <b>
- 6
- in the head
- 1
- <h6>
- 4
- <h3>
- My pets
- 2
- </h3>
- </html>
- https://example.com
- True
- About us
- a slash /
- Yes
- <h6>
- False
- </b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids