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.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Good morning!</p>
<h3>Rain today</h3> - 2.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 3.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) is where we type code (d) turns HTML into a page
- 4.True or false: a code editor is where we type code. (a) True (b) False
-
5.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> (a) Good morning! (b) Hello, world! (c) Our school trip -
6.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>My best friend</p>
<h2>Hello, world!</h2> -
7.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) https://example.com (b) href (c) Maths fun (d) Visit the site - 8.🔗 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">
- 9.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
-
10.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Good morning!</h4>
<h2>The red kite</h2> -
11.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> -
12.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Hello, world!</h2>
<p>Rain today</p> - 13.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
-
14.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 15.Which of these has a closing tag? (a) <hr> (b) <p> (c) <br> (d) <img>
- 16.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) </head>
- 17.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h2>
- 18.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
- 19.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
- 20.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
-
21.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>My pets</p> -
22.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Hello, world!</h2>
<p>Our school trip</p>
<p>The red kite</p>
<p>My best friend</p> - 23.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h5> (c) <h2> (d) <h6>
-
24.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
25.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers -
26.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> - 27.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) is where we type code
-
28.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p> (a) My best friend (b) Fun facts (c) I love mangoes. - 29.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
-
31.🔍 Which line is missing its closing tag?
line 1: <em>My pets</em>
line 2: <p>Our school trip</p>
line 3: <h3>I love mangoes. (a) line 3 (b) line 1 (c) line 2 - 32.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 33.True or false: HTML on its own can make tables. (a) False (b) True
-
34.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Fun facts</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h4>The red kite</h4> - 35.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) turns HTML into a page (d) sends pages over the net
- 36.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 37.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) width (d) alt
- 38.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
- 39.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
-
40.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) cake.jpg (b) Map of India (c) dog.jpg (d) map.png
Answer key
- 2
- <li>
- turns HTML into a page
- True
- Hello, world!
- 4
- Visit the site
- <a href="about.html">
- <img>
- 3
- 2
- 2
- a web browser
- bullets
- <p>
- <!DOCTYPE html>
- <h6>
- <!DOCTYPE html>
- starts a new line
- alt
- 3
- 4
- <h1>
- numbers
- numbers
- 2
- is where we type code
- I love mangoes.
- a closing tag
- href
- line 3
- <a>
- True
- 2
- turns HTML into a page
- a closing tag
- alt
- a slash /
- <ul>
- map.png
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids