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 picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake -
2.🔗 Which words do you click on?
<a href="https://example.com">Contact us</a> (a) href (b) Contact us (c) Visit the site (d) https://example.com - 3.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
- 4.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
-
5.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> -
6.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Good morning! (b) Our school trip (c) Fun facts - 7.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 8.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 9.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
- 10.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 11.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
- 12.True or false: <ol> shows bullet points. (a) True (b) False
-
13.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) My drawings (c) body (d) Class 7 Blog -
14.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My best friend</p>
<h2>I love mangoes.</h2> -
15.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 16.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
- 17.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> - 19.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <u/> (d) <\u>
-
20.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="200"> (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg - 21.Which of these goes in the head? (a) <ul> (b) <table> (c) <link rel="stylesheet"> (d) <h1>
- 22.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 23.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 24.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .txt (d) .html
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> - 26.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
-
27.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 28.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h1>
-
30.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) news.html (b) Art corner (c) href (d) Maths fun - 31.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 33.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 34.📄 Can HTML on its own make tables? (a) No (b) Yes
- 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) sends pages over the net (d) opens web pages for us
- 36.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
37.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p> - 38.Which of these goes in the head? (a) <style> (b) <p> (c) <ul> (d) <a>
-
39.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>Cricket is fun.</h3>
<h3>Rain today</h3> - 40.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
Answer key
- cake.jpg
- Contact us
- </p>
- <h6>
- 6
- Our school trip
- <!DOCTYPE html>
- 1
- <a>
- Yes
- 6
- False
- My drawings
- 2
- in a new tab
- a web browser
- -->
- 300
- </u>
- fort.jpg
- <link rel="stylesheet">
- No
- in the body
- .html
- 250
- </strong>
- in a new tab
- an opening tag
- <h1>
- Maths fun
- True
- Yes
- No
- Yes
- sends pages over the net
- in the body
- 2
- <style>
- 3
- <li>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids