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: HTML on its own cannot run a game loop. (a) False (b) True
-
2.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) Fun facts (b) My pets (c) Our school trip (d) I love mangoes. -
3.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
4.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 5.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
- 6.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 7.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h6>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
-
8.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) All about me (d) Mars is red. - 9.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) stores a website’s files (d) colours code to help us
-
10.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) We won by 5 runs. (c) body (d) All about me -
11.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) href (b) art.html (c) Take the quiz (d) Play games - 12.True or false: <img> has a closing tag. (a) True (b) False
- 13.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
-
14.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Art corner (b) href (c) Maths fun (d) https://example.com -
15.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) news.html (b) games.html (c) quiz.html (d) Take the quiz -
16.🔗 Where does this link open?
<a href="maths.html">Contact us</a> (a) in the same tab (b) in a new tab - 17.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
- 19.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 20.📄 Can HTML on its own make headings? (a) No (b) Yes
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Space Facts (c) index.html (d) Easy snacks - 22.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 23.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 24.True or false: <ul> goes in the body. (a) False (b) True
- 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
26.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers - 27.Which of these goes in the head? (a) <ul> (b) <img> (c) <h1> (d) <link rel="stylesheet">
-
28.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> -
29.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) Good morning! (c) The red kite - 30.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
- 31.True or false: in <img>, alt describes the picture. (a) False (b) True
- 32.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
33.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers -
34.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> - 35.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
- 36.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) </head> (d) <!DOCTYPE html>
-
37.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My pets</p>
<p>My pets</p>
<p>My pets</p> - 38.True or false: <a> goes in the body. (a) True (b) False
- 39.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
40.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
</ul>
Answer key
- True
- Fun facts
- bullets
- 1
- a code editor
- True
- <h6>
- All about me
- stores a website’s files
- All about me
- Take the quiz
- False
- <!DOCTYPE html>
- Maths fun
- news.html
- in the same tab
- an opening tag
- alt
- 6
- Yes
- Space Facts
- an opening tag
- an opening tag
- True
- No
- bullets
- <link rel="stylesheet">
- 3
- Rain today
- width
- True
- Yes
- bullets
- 2
- an attribute
- <!DOCTYPE html>
- 4
- True
- <ul>
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids