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 code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
-
2.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>My best friend</p> -
3.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> -
4.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
<p>My pets</p> (a) My pets (b) Good morning! (c) My best friend - 5.Which of these is an opening tag? (a) </b> (b) <li> (c) </body> (d) </p>
- 6.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
-
7.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) games.html (b) Take the quiz (c) href (d) School news - 8.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
-
9.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Our school trip</p> -
10.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>Fun facts</p> - 11.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
- 12.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
- 13.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
14.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Our school trip</p>
<p>My best friend</p>
<h2>I love mangoes.</h2>
<p>Rain today</p> -
15.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> --> - 16.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) Our school bus (b) bus.jpg (c) An old fort (d) width - 18.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
-
19.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>My pets</p> - 20.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 21.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h1> (b) <h5> (c) <h4> (d) <h6>
- 22.True or false: in <img>, src shows if the image fails. (a) True (b) False
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) Our school bus (b) bus.jpg (c) An old fort (d) width - 24.Which of these is a closing tag? (a) <body> (b) <h1> (c) <li> (d) </title>
- 25.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
- 26.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
- 27.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
- 28.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
- 29.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
30.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) Play games (c) contact.html (d) https://example.com - 31.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
-
32.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Kites fly high</p> -
33.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers -
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Art Gallery (b) Mars is red. (c) index.html (d) All about me - 35.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) width (d) height
- 36.Which of these is a closing tag? (a) <h1> (b) </body> (c) <p> (d) <b>
- 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
- 38.True or false: <ul> is an empty tag. (a) False (b) True
-
39.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) About us (b) about.html (c) href (d) Play games -
40.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<!-- <p>Good morning!</p> -->
Answer key
- <a href="about.html">
- 3
- 1
- Good morning!
- <li>
- a web server
- School news
- <h1>
- 4
- 4
- <h5>
- opens it in a new tab
- in the head
- 5
- 2
- <!DOCTYPE html>
- Our school bus
- an attribute
- 4
- No
- <h1>
- False
- Our school bus
- </title>
- to leave notes
- <h5>
- starts a new line
- <!--
- a closing tag
- contact.html
- to describe the image
- 3
- bullets
- Art Gallery
- src
- </body>
- 1
- False
- Play games
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids