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.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Rain today</p>
<p>Good morning!</p> - 2.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
- 3.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
- 4.True or false: <li> goes inside ul or ol. (a) True (b) False
-
5.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Our school trip</p>
<h4>The red kite</h4>
<p>My best friend</p> -
6.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.
line 2: <h3>Hello, world!</h3>
line 3: <strong>I love mangoes.</strong> (a) line 1 (b) line 3 (c) line 2 - 7.True or false: <title> goes in the head. (a) False (b) True
- 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
9.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> - 10.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) <h3> (c) </h3> (d) <\h3>
- 11.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) <!DOCTYPE html> (d) </html>
-
12.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> (a) My pets (b) Cricket is fun. (c) The red kite (d) Fun facts - 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
14.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) href (b) Play games (c) https://example.com (d) About us - 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
- 17.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
-
18.🔍 Which line is missing its closing tag?
line 1: <small>I love mangoes.</small>
line 2: <u>My best friend
line 3: <em>Rain today</em> (a) line 3 (b) line 1 (c) line 2 - 19.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
- 20.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
- 21.Which of these is a closing tag? (a) <li> (b) <title> (c) </p> (d) <b>
- 22.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 23.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) news.html (b) quiz.html (c) art.html (d) Visit the site -
25.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="400"> -
26.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<h3>Our school trip</h3>
<u>Good morning! (a) </h2> (b) </strong> (c) </h3> (d) </u> -
27.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> (a) Hello, world! (b) I love mangoes. (c) Good morning! (d) Cricket is fun. - 28.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
-
29.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> - 30.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 31.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 32.🧱 HTML gives a web page its ___. (a) structure (b) speed (c) colours (d) sound
- 33.True or false: <ul> goes in the head. (a) True (b) False
-
34.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) Take the quiz (b) Play games (c) href (d) https://example.com -
35.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> - 36.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
-
37.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> --> - 38.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
- 39.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <br> (d) <input>
- 40.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
Answer key
- 3
- <!DOCTYPE html>
- 1
- True
- 2
- line 1
- True
- Yes
- 2
- </h3>
- <!DOCTYPE html>
- Fun facts
- No
- Play games
- <ol>
- src
- <
- line 2
- <ol>
- 6
- </p>
- in the head
- has a closing tag
- art.html
- 400
- </u>
- Hello, world!
- as one space
- 3
- <img>
- <a href="about.html">
- structure
- False
- Take the quiz
- 400
- a web server
- 1
- <a>
- <ul>
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids