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 words do you click on?
<a href="quiz.html">Visit the site</a> (a) href (b) Visit the site (c) quiz.html (d) Maths fun -
2.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> --> - 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
- 4.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
-
6.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) My best friend (b) Cricket is fun. (c) My pets - 7.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
- 8.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
- 9.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) </small> (d) <small/>
-
10.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>My best friend</p>
<p>I love mangoes.</p> - 11.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
- 12.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
13.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>My best friend</p> - 14.True or false: a web browser hosts websites online. (a) True (b) False
- 15.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <input> (d) <li>
- 16.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> - 19.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
- 20.True or false: a web browser shows pages from the web. (a) True (b) False
- 21.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
-
22.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) news.html (c) maths.html (d) art.html -
23.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="200"> (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png -
24.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>Our school trip</p>
<p>I love mangoes.</p> (a) Hello, world! (b) Rain today (c) I love mangoes. (d) Our school trip -
25.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> - 26.True or false: <ul> is an empty tag. (a) False (b) True
- 27.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
- 28.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
- 29.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
-
30.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="200"> (a) Our school bus (b) An old fort (c) bus.jpg (d) width -
31.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>My best friend</p>
<p>Cricket is fun.</p> -
32.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) art.html (b) maths.html (c) https://example.com (d) School news - 33.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 34.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 35.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
- 36.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </body> (b) </head>
- 37.True or false: a code editor colours code to help us. (a) True (b) False
- 38.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
39.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>My pets</p>
<p>My best friend</p> (a) My best friend (b) The red kite (c) Cricket is fun. (d) My pets -
40.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> --> (a) Our school trip (b) My pets (c) The red kite (d) I love mangoes.
Answer key
- Visit the site
- 1
- an attribute
- in the head
- 6
- Cricket is fun.
- height
- <h1>
- </small>
- 3
- a paragraph
- <ul>
- 2
- False
- <input>
- has a closing tag
- to leave notes
- 250
- href
- True
- <li>
- maths.html
- fort.jpg
- Rain today
- 2
- False
- Language
- a line across the page
- starts a new line
- Our school bus
- 4
- https://example.com
- No
- <a>
- -->
- </head>
- True
- Yes
- The red kite
- I love mangoes.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids