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 code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
-
2.🔍 Which line is missing its closing tag?
line 1: <h1>My best friend</h1>
line 2: <small>Good morning!
line 3: <p>Fun facts</p> (a) line 2 (b) line 3 (c) line 1 - 3.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
- 4.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
- 5.True or false: in <img>, width sets how tall it is. (a) True (b) False
-
6.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>My best friend</p>
<p>Rain today</p>
<p>Our school trip</p> (a) Our school trip (b) Hello, world! (c) Rain today (d) My best friend -
7.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) https://example.com (b) contact.html (c) Maths fun (d) about.html - 8.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Laptop (d) Language
-
9.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing<br>Stars shine</p> - 10.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 11.True or false: a web browser opens web pages for us. (a) True (b) False
- 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
- 13.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
- 14.True or false: in <img>, alt describes the picture. (a) False (b) True
-
15.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 16.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) a comment (d) an attribute
- 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
18.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg - 19.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 20.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
- 21.True or false: HTML on its own can make links to pages. (a) True (b) False
- 22.True or false: <style> goes in the head. (a) True (b) False
- 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
- 24.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
-
25.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<h2>My pets</h2> - 26.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
-
27.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Our school trip</p> --> - 28.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) hosts websites online (d) saves our .html files
- 29.True or false: <input> is an empty tag. (a) False (b) True
- 30.Which of these goes in the head? (a) <h1> (b) <a> (c) <style> (d) <table>
-
31.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
32.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets - 33.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets - 35.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 36.📄 Can HTML on its own pick a random number? (a) Yes (b) No
-
37.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Cricket is fun.</h2>
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
<h2>My pets</h2> - 38.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h6> or <h5>? (a) <h6> (b) <h4> (c) <h3> (d) <h5>
- 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </head> (d) </html>
-
40.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<!-- <p>I love mangoes.</p> -->
Answer key
- <a href="about.html">
- line 2
- <h1>
- a web server
- False
- Hello, world!
- about.html
- Language
- 3
- Yes
- True
- <!DOCTYPE html>
- <h1>
- True
- numbers
- an attribute
- Yes
- bus.jpg
- href
- <!--
- True
- True
- width
- <a>
- 2
- <
- 2
- opens web pages for us
- True
- <style>
- in a new tab
- numbers
- <ul>
- bullets
- a web browser
- No
- 3
- <h6>
- </html>
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids