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.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
-
2.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<!-- <p>My best friend</p> --> - 3.Which of these is an empty tag? (a) <input> (b) <b> (c) <h1> (d) <ul>
- 4.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
- 5.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <body>
- 6.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 7.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
-
8.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts</h3>
line 2: <p>The red kite</p>
line 3: <h1>My best friend (a) line 1 (b) line 2 (c) line 3 - 9.True or false: <b> is an empty tag. (a) True (b) False
- 10.📄 Can HTML on its own pick a random number? (a) No (b) Yes
- 11.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 12.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
-
13.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> - 14.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) </small> (d) <small>
- 15.True or false: HTML on its own cannot make a form. (a) True (b) False
- 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
- 17.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
-
18.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 19.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) High Tech (d) HyperText
- 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 21.📄 Can HTML on its own make headings? (a) Yes (b) No
- 22.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h2> (c) <h4> (d) <h3>
- 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 24.Which of these is an empty tag? (a) <p> (b) <br> (c) <ul> (d) <li>
- 25.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 26.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
-
27.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) href (b) Play games (c) contact.html (d) About us - 28.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a microphone (d) a printer
-
29.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!
line 2: <small>The red kite</small>
line 3: <em>I love mangoes.</em> (a) line 2 (b) line 3 (c) line 1 -
30.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
- 32.📄 Can HTML on its own make a form? (a) No (b) Yes
-
33.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Good morning!</p>
<h2>My pets</h2> - 34.True or false: <hr> is an empty tag. (a) False (b) True
- 35.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <h1>
- 36.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
- 37.True or false: HTML on its own cannot make headings. (a) True (b) False
- 38.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) opens web pages for us (d) shows line numbers
-
39.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in the same tab (b) in a new tab -
40.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<p>The red kite</p>
<p>Fun facts</p> (a) Cricket is fun. (b) Fun facts (c) The red kite (d) Rain today
Answer key
- to describe the image
- 1
- <input>
- href
- <!DOCTYPE html>
- in the head
- alt
- line 3
- False
- No
- <a href="about.html">
- <ul>
- 2
- </small>
- False
- an attribute
- <!--
- numbers
- HyperText
- opens it in a new tab
- Yes
- <h2>
- <!DOCTYPE html>
- <br>
- Yes
- <h1>
- Play games
- a plain text editor
- line 1
- 3
- <h5>
- Yes
- 2
- True
- <h1>
- 6
- False
- stores a website’s files
- in the same tab
- Cricket is fun.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids