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> is read by screen readers? (a) height (b) width (c) src (d) alt
- 2.True or false: <br> is an empty tag. (a) False (b) True
-
3.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>I love mangoes.</h2> - 4.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
-
5.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My pets</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) My pets (c) Good morning! - 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
7.🔍 One closing tag is missing. Which one?
<small>Rain today</small>
<i>Good morning!</i>
<b>My pets (a) </i> (b) </h2> (c) </small> (d) </b> - 8.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
9.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) about.html (b) Take the quiz (c) games.html (d) contact.html -
10.🔗 Which words do you click on?
<a href="news.html">Take the quiz</a> (a) Play games (b) href (c) Take the quiz (d) news.html - 11.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
- 12.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
- 13.True or false: <ul> lists steps in order. (a) True (b) False
- 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 15.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
-
16.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) contact.html (b) Play games (c) maths.html (d) https://example.com - 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
- 18.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) saves our .html files (d) colours code to help us
- 19.True or false: <b> is an empty tag. (a) False (b) True
-
20.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>My best friend</p> (a) I love mangoes. (b) My best friend (c) Rain today (d) Hello, world! - 21.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 22.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
- 23.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
- 24.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 26.Which of these is true of a web browser? (a) answers page requests (b) shows pages from the web (c) saves our .html files (d) shows line numbers
-
27.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Try this poha.</p>
</body>
</html> (a) Planets (b) Try this poha. (c) My Hobbies (d) body - 28.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
29.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
</ul> - 30.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 31.Which of these is a closing tag? (a) <p> (b) <li> (c) <b> (d) </b>
- 32.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
- 33.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
- 34.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
- 35.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 36.True or false: a web browser saves our .html files. (a) False (b) True
-
37.🔗 Where does this link open?
<a href="contact.html">Contact us</a> (a) in a new tab (b) in the same tab - 38.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 39.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
- 40.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) </html> (b) <body>
Answer key
- alt
- True
- 4
- False
- Rain today
- Yes
- </b>
- True
- games.html
- Take the quiz
- starts a new line
- a line across the page
- False
- True
- <h6>
- contact.html
- as one space
- stores a website’s files
- False
- Rain today
- <ul>
- </h2>
- a web browser
- <ol>
- <a href="about.html">
- shows pages from the web
- Planets
- an opening tag
- 4
- <a>
- </b>
- <h6>
- in the body
- 1
- an empty tag
- False
- in the same tab
- a web server
- <h1>
- <body>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids