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.True or false: <ul> has a closing tag. (a) False (b) True
- 2.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
- 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
-
4.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>Rain today</p>
<p>The red kite</p> - 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
-
6.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p> - 7.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
-
8.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png - 9.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) hosts websites online (d) stores a website’s files
- 10.Which of these is an empty tag? (a) <h1> (b) <input> (c) <li> (d) <b>
-
11.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> (a) Hello, world! (b) I love mangoes. (c) Cricket is fun. (d) The red kite - 12.True or false: in <img>, alt names the picture file. (a) False (b) True
-
13.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) Contact us (c) games.html (d) Visit the site -
14.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> - 15.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
16.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>My best friend</p> - 17.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
- 18.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) opens web pages for us (d) is where we type code
-
19.📋 What number does the browser show next to “Grapes”?
<ol start="5">
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite - 21.Which of these is an opening tag? (a) </title> (b) </p> (c) </body> (d) <li>
- 22.🔍 Which is the odd one out? (a) sends pages over the net (b) shows line numbers (c) answers page requests (d) hosts websites online
- 23.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
-
24.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Fun facts</p>
<p>My pets</p>
<p>The red kite</p> - 25.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) alt (d) height
- 26.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 27.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h4>
-
28.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> - 29.True or false: <li> shows bullet points. (a) True (b) False
- 30.🔗 What does HyperText mean? (a) text with links (b) text in colour (c) very big text (d) secret text
-
31.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>My pets</p> (a) My pets (b) The red kite (c) Hello, world! - 32.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.🔠 How many headings are in this code?
<h1>My pets</h1>
<h4>Hello, world!</h4>
<p>Our school trip</p> -
34.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<p>Fun facts</p>
<p>I love mangoes.</p> - 35.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
- 36.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 37.🔍 Which is the odd one out? (a) sends pages over the net (b) is where we type code (c) colours code to help us (d) shows line numbers
-
38.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) href (d) art.html - 39.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
- 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
Answer key
- True
- to leave notes
- as one space
- 4
- No
- 4
- <h2>
- moon.png
- saves our .html files
- <input>
- Cricket is fun.
- False
- Contact us
- 300
- an opening tag
- 4
- 6
- is where we type code
- 10
- A tiger asleep
- <li>
- shows line numbers
- <ol>
- 5
- height
- <ol>
- <h1>
- 150
- False
- text with links
- Hello, world!
- a closing tag
- 2
- 2
- <li>
- <ul>
- sends pages over the net
- Visit the site
- <h2>
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids