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: in <img>, height names the picture file. (a) True (b) False
- 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
-
3.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Rain today</p>
<p>The red kite</p>
<p>My pets</p>
<h2>Hello, world!</h2> - 4.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
-
5.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> (a) Fun facts (b) Our school trip (c) Hello, world! (d) My best friend - 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 7.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
-
8.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<i>Good morning!</i>
<em>My best friend (a) </h2> (b) </h1> (c) </i> (d) </em> - 9.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
-
10.📋 What number does the browser show next to “Orange”?
<ol start="9">
<li>Banana</li>
<li>Guava</li>
<li>Mango</li>
<li>Papaya</li>
<li>Orange</li>
</ol> - 11.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h5>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
- 12.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 13.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
- 14.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 15.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Papaya</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers -
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake - 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 19.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
-
20.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>Good morning!</p> --> (a) Fun facts (b) Good morning! (c) Hello, world! (d) My best friend -
21.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>My best friend</h2>
<p>Good morning!</p>
<p>Fun facts</p>
<p>My best friend</p>
<p>Hello, world!</p> - 22.Which of these is a closing tag? (a) </b> (b) <p> (c) <body> (d) <b>
- 23.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
24.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Rain today</p>
<h4>My best friend</h4>
<h3>Our school trip</h3> -
25.🖼️ 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 -
26.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) art.html (c) maths.html (d) news.html - 27.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 28.💬 Does the browser show comments on the page? (a) No (b) Yes
-
29.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Hello, world!</p>
<p>Fun facts</p>
<p>Hello, world!</p> -
30.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>I love mangoes.</p>
<h2>Rain today</h2>
<h3>Rain today</h3> - 31.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
-
32.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2>
<p>Cricket is fun.</p>
<p>My best friend</p> - 33.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 34.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
- 36.True or false: a code editor saves our .html files. (a) False (b) True
-
37.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> (a) My pets (b) Good morning! (c) Cricket is fun. - 38.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
- 39.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
- 40.True or false: <a> goes in the body. (a) False (b) True
Answer key
- False
- <img>
- 4
- <h6>
- Fun facts
- in the body
- <a href="about.html">
- </em>
- the body
- 13
- <h6>
- in the head
- <!DOCTYPE html>
- True
- a closing tag
- numbers
- Birthday cake
- 1
- <a>
- Good morning!
- 5
- </b>
- <ol>
- 3
- The full moon
- maths.html
- <ol>
- No
- 1
- 3
- a slash /
- 4
- <h1>
- an empty tag
- <h1>
- True
- My pets
- element
- opens it in a new tab
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids