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.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
2.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) Hello, world! (b) Our school trip (c) My best friend (d) I love mangoes. - 3.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
- 4.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
- 5.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
- 6.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
-
7.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) href (b) About us (c) Contact us (d) about.html -
8.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> -
9.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) bus.jpg (c) The full moon (d) fort.jpg -
10.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My best friend</p>
<h2>Rain today</h2>
<h2>Rain today</h2> - 11.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
- 12.Which of these is an empty tag? (a) <p> (b) <h1> (c) <li> (d) <hr>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite - 14.Which of these is true of a web server? (a) sends pages over the net (b) colours code to help us (c) turns HTML into a page (d) opens web pages for us
- 15.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
-
16.🔍 One closing tag is missing. Which one?
<h2>Good morning!</h2>
<strong>I love mangoes.</strong>
<small>My best friend (a) </h2> (b) </u> (c) </small> (d) </strong> - 17.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
-
18.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>The red kite</h2>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>Rain today</p>
<p>Fun facts</p> - 19.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 20.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) shows pages from the web
- 21.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
- 22.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
- 23.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
24.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) Take the quiz (c) contact.html (d) Play games -
25.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> -
26.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Orange</li>
<li>Grapes</li>
<li>Guava</li>
</ul> -
27.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> - 28.True or false: a web server hosts websites online. (a) False (b) True
- 29.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
-
30.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<b>Cricket is fun.</b>
<em>Good morning! (a) </em> (b) </b> (c) </h2> (d) </small> -
31.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) href (b) Visit the site (c) contact.html (d) Contact us -
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) My Hobbies (b) index.html (c) Welcome! (d) I like to read. - 33.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
- 34.True or false: <li> is an unordered list. (a) False (b) True
-
35.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) School news (b) Art corner (c) href (d) games.html -
36.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) contact.html (b) https://example.com (c) Maths fun (d) about.html - 37.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
-
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) Our school bus (b) An old fort (c) width (d) bus.jpg - 39.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 40.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
Answer key
- in the same tab
- Our school trip
- alt
- <h1>
- the body
- starts a new line
- About us
- 2
- moon.png
- 2
- <h5>
- <hr>
- A tiger asleep
- sends pages over the net
- opens it in a new tab
- </small>
- <h4>
- 4
- an opening tag
- shows pages from the web
- True
- <h3>
- in the body
- Take the quiz
- 2
- 6
- 3
- True
- False
- </em>
- Contact us
- My Hobbies
- a code editor
- False
- Art corner
- about.html
- a paragraph
- Our school bus
- <h1>
- a web server
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids