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.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 2.Which of these is a closing tag? (a) <p> (b) <li> (c) <body> (d) </li>
-
3.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers -
4.🔍 Which line is missing its closing tag?
line 1: <u>My pets</u>
line 2: <strong>Rain today</strong>
line 3: <h1>My best friend (a) line 2 (b) line 1 (c) line 3 - 5.True or false: a code editor shows line numbers. (a) True (b) False
-
6.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 7.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 8.True or false: in <img>, alt describes the picture. (a) True (b) False
- 9.True or false: <style> goes in the body. (a) True (b) False
-
10.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) School news (b) about.html (c) contact.html (d) https://example.com - 11.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) opens web pages for us (d) is where we type code
-
12.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Rain today</p>
<h2>Hello, world!</h2>
<p>Good morning!</p>
<p>Good morning!</p> - 13.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
- 14.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
- 15.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
- 16.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
- 17.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
- 18.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
- 19.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
- 20.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 21.True or false: <img> is an empty tag. (a) False (b) True
-
22.📋 What number does the browser show next to “Grapes”?
<ol start="7">
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
</ol> -
23.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 24.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
-
25.🔍 Which line is missing its closing tag?
line 1: <b>My best friend</b>
line 2: <h2>I love mangoes.
line 3: <p>Fun facts</p> (a) line 3 (b) line 1 (c) line 2 -
26.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> --> -
27.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png - 28.True or false: in <img>, src names the picture file. (a) False (b) True
- 29.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
-
30.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Fun facts</p> -
31.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> - 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
33.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<!-- <p>My best friend</p> --> - 34.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
36.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Kites fly high</p> - 37.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
-
38.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Papaya</li>
</ul> -
39.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Mango</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
<li>Banana</li>
</ol> - 40.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- an opening tag
- </li>
- numbers
- line 3
- True
- 50
- <ol>
- True
- False
- about.html
- is where we type code
- 4
- a paragraph
- HyperText
- <h6>
- <h1>
- <a href="about.html">
- <h6>
- 1
- No
- True
- 8
- 2
- alt
- line 2
- 2
- tiger.jpg
- True
- <ol>
- 2
- 300
- Yes
- 1
- a closing tag
- Yes
- 3
- <h1>
- 5
- 3
- in the head
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids