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 address opens when you click this link?
<a href="news.html">Play games</a> (a) games.html (b) news.html (c) quiz.html (d) Play games - 2.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
-
3.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) About us (b) href (c) about.html (d) Contact us - 4.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 5.Which of these is true of a web server? (a) sends pages over the net (b) turns HTML into a page (c) opens web pages for us (d) shows line numbers
- 6.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
- 7.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
- 8.🏷️ Which is the closing tag for <u>? (a) </u> (b) <\u> (c) <u> (d) <u/>
-
9.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
10.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers -
11.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 12.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h5>
-
13.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) contact.html (b) Contact us (c) href (d) About us - 14.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
-
15.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) maths.html (c) contact.html (d) https://example.com - 16.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) stores a website’s files (d) shows line numbers
-
17.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> --> -
18.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Hello, world!</p> -
19.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>My best friend</p> (a) The red kite (b) My best friend (c) Hello, world! - 20.True or false: <h1> is an empty tag. (a) True (b) False
- 21.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
- 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
24.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <strong>Fun facts</strong>
line 3: <h1>I love mangoes. (a) line 2 (b) line 3 (c) line 1 -
25.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> -->
<p>Rain today</p> - 26.Which of these is true of a web server? (a) stores a website’s files (b) shows line numbers (c) shows pages from the web (d) turns HTML into a page
- 27.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) ( (d) [
- 28.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
-
29.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) width (c) Our school bus (d) The full moon -
30.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Papaya</li>
</ul> (a) bullets (b) numbers - 31.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) </body>
-
32.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Birds sing</p> -
33.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>My pets</h2>
<h4>I love mangoes.</h4> - 34.📄 Can HTML on its own make headings? (a) Yes (b) No
-
35.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>My pets</p> (a) My best friend (b) Good morning! (c) My pets -
36.🔗 Where does this link open?
<a href="contact.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 37.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
-
38.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Our school trip</p> - 39.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 40.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
Answer key
- news.html
- width
- About us
- 6
- sends pages over the net
- alt
- <!--
- </u>
- 4
- bullets
- 250
- <h1>
- About us
- <img>
- contact.html
- stores a website’s files
- 1
- 2
- The red kite
- False
- <h5>
- <h1>
- has a closing tag
- line 3
- 1
- stores a website’s files
- <
- <h1>
- The full moon
- bullets
- <!DOCTYPE html>
- 3
- 3
- Yes
- My best friend
- in a new tab
- <h1>
- 4
- <h2>
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids