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="art.html">School news</a> (a) art.html (b) Take the quiz (c) href (d) School news -
2.🔍 One closing tag is missing. Which one?
<u>My best friend
<h1>The red kite</h1>
<h2>My pets</h2> (a) </h2> (b) </u> (c) </h1> (d) </strong> - 3.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
-
4.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> --> (a) I love mangoes. (b) The red kite (c) My pets (d) Cricket is fun. - 5.Which of these is a closing tag? (a) <body> (b) <p> (c) </body> (d) <li>
- 6.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
- 7.💬 Does the browser show comments on the page? (a) No (b) Yes
- 8.Which of these is true of a code editor? (a) saves our .html files (b) sends pages over the net (c) stores a website’s files (d) shows pages from the web
- 9.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
-
10.🔍 Which line is missing its closing tag?
line 1: <small>The red kite
line 2: <u>Good morning!</u>
line 3: <i>Cricket is fun.</i> (a) line 1 (b) line 3 (c) line 2 -
11.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> - 12.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
- 13.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
- 14.True or false: <ul> is an empty tag. (a) True (b) False
-
15.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Kites fly high<br>Sky is blue</p> -
16.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> - 17.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .mp3 (d) .png
-
18.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Our school trip</p>
<h4>I love mangoes.</h4> - 19.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
-
20.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Rain today</p>
<p>Good morning!</p>
<h2>Hello, world!</h2>
<p>My pets</p> -
21.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Our school trip</p> --> (a) My best friend (b) Our school trip (c) My pets - 22.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 23.True or false: <ol> lists steps in order. (a) True (b) False
- 24.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 25.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) turns HTML into a page (d) is where we type code
-
26.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Fun facts</p>
<h2>I love mangoes.</h2>
<h4>The red kite</h4>
<p>I love mangoes.</p> -
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<p>Hello, world!</p> - 28.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
- 29.Which of these is an opening tag? (a) </p> (b) </b> (c) </li> (d) <p>
- 30.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
-
31.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) Contact us (b) news.html (c) quiz.html (d) art.html -
32.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.</i>
line 2: <em>My pets</em>
line 3: <h1>My best friend (a) line 2 (b) line 1 (c) line 3 -
33.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> --> - 34.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 35.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 36.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 37.True or false: <ol> shows bullet points. (a) False (b) True
-
38.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.</h3>
<small>My best friend
<h1>My pets</h1> (a) </h1> (b) </em> (c) </h3> (d) </small> - 39.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i/> (c) <\i> (d) <i>
-
40.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) A happy dog (b) dog.jpg (c) moon.png (d) bus.jpg
Answer key
- School news
- </u>
- an attribute
- My pets
- </body>
- <h1>
- No
- saves our .html files
- <h6>
- line 1
- 2
- to describe the image
- <
- False
- 4
- 350
- .html
- 2
- to leave notes
- 4
- Our school trip
- <li>
- True
- No
- turns HTML into a page
- 3
- 1
- <h5>
- <p>
- opens it in a new tab
- art.html
- line 3
- 1
- has a closing tag
- in the body
- <a>
- False
- </small>
- </i>
- dog.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids