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.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 2.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 3.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
-
4.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) Cricket is fun. - 5.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
- 6.Which of these is an empty tag? (a) <title> (b) <li> (c) <ul> (d) <meta>
- 7.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
-
8.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Birds sing<br>Stars shine<br>Sky is blue</p> - 9.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 10.True or false: <ul> goes in the body. (a) True (b) False
- 11.Which of these goes in the head? (a) <p> (b) <table> (c) <h1> (d) <style>
- 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 13.True or false: <h1> has a closing tag. (a) True (b) False
- 14.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
-
15.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) fort.jpg (b) bus.jpg (c) tiger.jpg (d) Our school bus -
16.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<p>The red kite</p>
<p>My pets</p> -
17.🔍 One closing tag is missing. Which one?
<h2>Fun facts</h2>
<em>The red kite
<h1>I love mangoes.</h1> (a) </em> (b) </h3> (c) </h2> (d) </h1> - 18.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 19.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
- 20.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
-
21.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2> - 22.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h5>? (a) <h3> (b) <h5> (c) <h1> (d) <h4>
-
23.🔍 One closing tag is missing. Which one?
<h2>My best friend</h2>
<b>Hello, world!
<h3>The red kite</h3> (a) </h2> (b) </strong> (c) </b> (d) </h3> - 24.📝 What does <br> do? (a) makes a list (b) makes text bold (c) adds a picture (d) starts a new line
- 25.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) hosts websites online (d) turns HTML into a page
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="400"> - 27.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
- 28.True or false: in <img>, height names the picture file. (a) True (b) False
- 29.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
-
30.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> (a) I love mangoes. (b) The red kite (c) My best friend (d) Good morning! -
31.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Contact us (b) href (c) games.html (d) Visit the site - 32.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 33.Which of these is true of a web browser? (a) shows pages from the web (b) saves our .html files (c) is where we type code (d) sends pages over the net
- 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
- 35.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 36.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h5>
-
37.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ol> -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) width (c) Our school bus (d) The full moon - 39.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
- 40.True or false: <ol> lists steps in order. (a) True (b) False
Answer key
- in the body
- <!--
- <h6>
- Cricket is fun.
- <li>
- <meta>
- a line across the page
- 5
- False
- True
- <style>
- No
- True
- 1
- bus.jpg
- 3
- </em>
- a slash /
- <h6>
- a web browser
- 4
- <h1>
- </b>
- starts a new line
- hosts websites online
- 400
- a web server
- False
- <li>
- Good morning!
- Contact us
- False
- shows pages from the web
- <a href="about.html">
- False
- <h6>
- 3
- The full moon
- href
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids