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 attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
- 2.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 4.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
- 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
-
6.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<p>My pets
<b>Good morning!</b> (a) </h2> (b) </b> (c) </h1> (d) </p> - 7.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong/> (c) <\strong> (d) <strong>
- 8.Which of these goes in the head? (a) <a> (b) <img> (c) <ul> (d) <title>
- 9.True or false: <ul> goes inside ul or ol. (a) False (b) True
-
10.🔍 Which line is missing its closing tag?
line 1: <strong>My pets</strong>
line 2: <em>Hello, world!</em>
line 3: <h3>Cricket is fun. (a) line 1 (b) line 2 (c) line 3 - 11.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
- 12.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <a>
- 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 14.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 16.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
-
17.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 18.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 19.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
20.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) The full moon (c) moon.png (d) fort.jpg -
21.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Maths fun (b) href (c) news.html (d) Visit the site -
22.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> - 23.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) height (d) width
- 24.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 25.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 27.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
- 28.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
- 29.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
-
30.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) quiz.html (b) news.html (c) games.html (d) About us - 31.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
- 32.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
33.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<h2>Hello, world!</h2>
<p>My pets</p>
<h2>My best friend</h2>
<p>My best friend</p> - 34.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 35.True or false: <li> is one item of a list. (a) True (b) False
-
36.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>The red kite</p>
<h2>I love mangoes.</h2>
<p>Our school trip</p> - 37.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h1>
-
38.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Hello, world!</p> --> (a) Our school trip (b) My pets (c) My best friend (d) Hello, world! -
39.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> - 40.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h4>
Answer key
- width
- an opening tag
- <h1>
- src
- <h1>
- </p>
- </strong>
- <title>
- False
- line 3
- <h6>
- <a>
- 1
- an opening tag
- in the head
- <h6>
- numbers
- a closing tag
- an opening tag
- moon.png
- Visit the site
- 300
- alt
- <ul>
- Yes
- Yes
- <h1>
- a code editor
- <!DOCTYPE html>
- news.html
- <ol>
- <a>
- 4
- in the body
- True
- 4
- <h1>
- Hello, world!
- 1
- <h3>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids