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 words do you click on?
<a href="https://example.com">Play games</a> (a) About us (b) https://example.com (c) href (d) Play games -
2.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 3.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) shows line numbers
-
4.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg - 5.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 7.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 8.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
-
9.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) maths.html (b) Art corner (c) School news (d) href - 10.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 11.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 12.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
- 13.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
-
14.🔗 Which address opens when you click this link?
<a href="games.html">Art corner</a> (a) games.html (b) contact.html (c) about.html (d) Art corner - 15.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
-
16.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Stars shine</p> - 17.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 18.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) </i> (d) <\i>
- 19.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) Our school bus (b) width (c) An old fort (d) bus.jpg - 21.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 22.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <head> (c) </body> (d) </html>
- 23.True or false: <img> goes in the head. (a) False (b) True
- 24.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 25.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 26.🔍 Which is the odd one out? (a) answers page requests (b) shows line numbers (c) saves our .html files (d) colours code to help us
- 27.💬 Does the browser show comments on the page? (a) No (b) Yes
-
28.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<p>My best friend</p>
<h4>Rain today</h4>
<h2>Rain today</h2> -
29.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Mango</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
</ul> - 30.Which of these is a closing tag? (a) <body> (b) </b> (c) <h1> (d) <title>
- 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
- 32.Which of these is an empty tag? (a) <h1> (b) <title> (c) <img> (d) <b>
-
33.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> --> - 34.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
- 35.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
- 36.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
- 37.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
38.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) Play games (b) news.html (c) About us (d) href - 39.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 40.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
Answer key
- Play games
- in a new tab
- shows line numbers
- dog.jpg
- an opening tag
- Yes
- href
- a web browser
- Art corner
- <ul>
- an opening tag
- alt
- <h1>
- games.html
- <h4>
- 5
- a web server
- </i>
- element
- Our school bus
- No
- </html>
- False
- 1
- <a>
- answers page requests
- No
- 3
- 6
- </b>
- <!DOCTYPE html>
- <img>
- 2
- width
- False
- Language
- a closing tag
- Play games
- <h1>
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids