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.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> - 2.Which of these goes in the head? (a) <table> (b) <title> (c) <ul> (d) <a>
- 3.True or false: HTML on its own can make headings. (a) True (b) False
-
4.📋 What number does the browser show next to “Banana”?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 5.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
- 6.Which of these is true of a code editor? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) answers page requests
- 7.True or false: <ul> lists things in any order. (a) True (b) False
- 8.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
- 9.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 10.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 11.True or false: in <img>, src describes the picture. (a) True (b) False
- 12.Which of these is an opening tag? (a) </body> (b) </p> (c) <b> (d) </b>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="400"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort - 14.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
- 15.True or false: <a> goes in the body. (a) True (b) False
- 16.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 18.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) colours code to help us (d) has an address bar
- 19.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 20.True or false: <table> goes in the head. (a) True (b) False
- 21.True or false: <style> goes in the head. (a) True (b) False
-
22.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow</p> - 23.Which of these goes in the head? (a) <a> (b) <h1> (c) <p> (d) <link rel="stylesheet">
-
24.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<h2>I love mangoes.</h2>
<p>My best friend</p> -
25.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Birds sing<br>Stars shine</p> -
26.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png -
27.📄 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) Welcome! (b) index.html (c) I like to read. (d) My Hobbies -
28.🔍 Which line is missing its closing tag?
line 1: <h2>Fun facts</h2>
line 2: <u>Our school trip</u>
line 3: <em>My best friend (a) line 1 (b) line 2 (c) line 3 - 29.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Machine (d) Markup
- 30.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
-
31.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> -
32.🔍 One closing tag is missing. Which one?
<small>Good morning!
<h1>Cricket is fun.</h1>
<h3>Our school trip</h3> (a) </small> (b) </h1> (c) </h3> (d) </h2> - 33.Which of these is true of a web browser? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) sends pages over the net
- 34.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
35.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Rain today</p> - 36.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 37.True or false: <b> is an empty tag. (a) True (b) False
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 39.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
- 40.Which of these is true of a code editor? (a) hosts websites online (b) has an address bar (c) stores a website’s files (d) shows line numbers
Answer key
- 100
- <title>
- True
- 3
- <
- colours code to help us
- True
- a paragraph
- Yes
- <li>
- False
- <b>
- An old fort
- to describe the image
- True
- a web server
- A happy dog
- has an address bar
- <a>
- False
- True
- 5
- <link rel="stylesheet">
- 3
- 4
- cake.jpg
- My Hobbies
- line 3
- Markup
- opens it in a new tab
- 2
- </small>
- turns HTML into a page
- an opening tag
- 3
- 6
- False
- 100
- <ul>
- shows line numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids