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 tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
-
2.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 3.Which of these is true of a code editor? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) is where we type code
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg - 5.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) <html> (b) </html>
- 6.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) </i> (d) <\i>
- 7.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
-
8.🔍 One closing tag is missing. Which one?
<i>Rain today</i>
<small>The red kite</small>
<h1>Cricket is fun. (a) </i> (b) </h1> (c) </small> (d) </b> - 9.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
-
10.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.</i>
<h2>My pets
<strong>Our school trip</strong> (a) </i> (b) </strong> (c) </h1> (d) </h2> - 11.True or false: in <img>, alt tells which image to load. (a) False (b) True
- 12.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 13.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.True or false: a code editor opens web pages for us. (a) True (b) False
- 15.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
- 16.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
-
17.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>My pets</p>
<h4>Fun facts</h4>
<h3>The red kite</h3> - 18.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
- 19.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 20.True or false: <ol> goes inside ul or ol. (a) False (b) True
- 21.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
- 22.Which of these is true of a web browser? (a) shows line numbers (b) saves our .html files (c) stores a website’s files (d) turns HTML into a page
-
23.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> (a) Our school trip (b) Good morning! (c) My best friend (d) My pets -
24.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> - 25.True or false: <style> goes in the body. (a) False (b) True
-
26.🔗 Which address opens when you click this link?
<a href="news.html">Contact us</a> (a) quiz.html (b) games.html (c) Contact us (d) news.html - 27.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
28.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Fun facts</p> - 29.True or false: a code editor saves our .html files. (a) True (b) False
-
30.📋 What number does the browser show next to “Jamun”?
<ol start="2">
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> - 31.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
-
32.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 33.True or false: <ul> has a closing tag. (a) True (b) False
-
34.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) https://example.com (b) contact.html (c) about.html (d) Visit the site -
35.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p> - 36.True or false: <li> is one item of a list. (a) True (b) False
- 37.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 38.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 39.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
- 40.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- <li>
- 400
- is where we type code
- Birthday cake
- <html>
- </i>
- <h6>
- </h1>
- starts a new line
- </h2>
- False
- in the body
- a closing tag
- False
- opens it in a new tab
- <h5>
- 3
- <a href="about.html">
- <!--
- False
- </h2>
- turns HTML into a page
- My best friend
- 3
- False
- news.html
- <ol>
- 2
- True
- 4
- a code editor
- bullets
- True
- about.html
- 1
- True
- an opening tag
- Yes
- <h1>
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids