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.📝 What does <p> make? (a) a paragraph (b) a table (c) a link (d) a picture
- 2.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
- 3.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
4.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) My pets (b) Our school trip (c) I love mangoes. - 5.Which of these is true of a web browser? (a) has an address bar (b) is where we type code (c) stores a website’s files (d) colours code to help us
- 6.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) src (d) height
- 7.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) Home Text (c) HyperText (d) High Tech
- 8.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
9.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> - 10.Which of these is an opening tag? (a) </body> (b) <h1> (c) </title> (d) </h1>
- 11.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 12.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
- 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h5> (d) <h2>
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg - 16.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
- 17.Which of these is a closing tag? (a) <h1> (b) <body> (c) <li> (d) </title>
- 18.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
- 19.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
- 20.Which of these is true of a code editor? (a) colours code to help us (b) opens web pages for us (c) shows pages from the web (d) turns HTML into a page
- 21.Which of these is an opening tag? (a) </p> (b) <b> (c) </li> (d) </title>
- 22.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
- 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 24.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
- 25.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 26.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 27.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
-
28.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<h2>I love mangoes.</h2> -
29.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Kites fly high</p> - 30.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) pixels (d) tags
-
31.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Mango</li>
</ul> -
32.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<h2>My pets</h2>
<h2>I love mangoes.</h2>
<p>My best friend</p> -
33.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Good morning!</p>
<p>Fun facts</p>
<h2>I love mangoes.</h2>
<h2>The red kite</h2>
<h2>Cricket is fun.</h2> - 34.True or false: <br> is an empty tag. (a) False (b) True
- 35.Which of these is true of a web browser? (a) answers page requests (b) is where we type code (c) shows line numbers (d) opens web pages for us
- 36.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) </h1> (d) <h1>
- 37.True or false: <li> is an empty tag. (a) False (b) True
- 38.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
-
39.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p> (a) The red kite (b) Hello, world! (c) My best friend (d) Cricket is fun. - 40.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
Answer key
- a paragraph
- <a href="about.html">
- an opening tag
- Our school trip
- has an address bar
- alt
- HyperText
- False
- 2
- <h1>
- has a closing tag
- a code editor
- a slash /
- <h2>
- A tiger asleep
- <!DOCTYPE html>
- </title>
- Language
- </p>
- colours code to help us
- <b>
- to describe the image
- in the head
- <!--
- <ol>
- a web browser
- a web browser
- 3
- 3
- tags
- 6
- 4
- 3
- True
- opens web pages for us
- </h1>
- False
- src
- Cricket is fun.
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids