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 paragraphs does this code make?
<p>Our school trip</p>
<p>My pets</p>
<h2>Hello, world!</h2>
<p>I love mangoes.</p> - 2.True or false: a web browser answers page requests. (a) True (b) False
- 3.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) colours code to help us (d) opens web pages for us
- 4.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <p> (d) <img>
-
5.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg -
6.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) map.png (b) A red kite (c) cake.jpg (d) kite.png - 7.Which of these is a closing tag? (a) <p> (b) <title> (c) <body> (d) </p>
- 8.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <b>
- 9.Which of these is an opening tag? (a) </b> (b) </h1> (c) <body> (d) </p>
-
10.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<h3>Cricket is fun.</h3>
<p>Good morning!</p>
<h3>The red kite</h3> -
11.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) School news (b) href (c) quiz.html (d) Take the quiz -
12.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) games.html (b) href (c) About us (d) Play games - 13.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
- 14.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 15.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 16.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
-
17.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>I love mangoes.</p> - 18.🔗 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
- 19.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
-
20.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p> - 21.True or false: <ol> shows bullet points. (a) True (b) False
- 22.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
- 23.🏷️ Which is the closing tag for <p>? (a) <\p> (b) </p> (c) <p/> (d) <p>
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) width (b) moon.png (c) The full moon (d) Our school bus - 25.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 26.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) hosts websites online (d) sends pages over the net
- 27.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
- 29.True or false: in <img>, alt describes the picture. (a) True (b) False
- 30.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
- 31.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 32.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
-
33.🔍 Which line is missing its closing tag?
line 1: <h2>My pets</h2>
line 2: <h1>Our school trip
line 3: <h3>Fun facts</h3> (a) line 3 (b) line 1 (c) line 2 - 34.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
- 35.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 36.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h5> (b) <h4> (c) <h1> (d) <h3>
- 37.True or false: HTML on its own can keep a high score. (a) True (b) False
- 38.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
- 39.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 40.Which of these is true of a web browser? (a) is where we type code (b) shows pages from the web (c) hosts websites online (d) shows line numbers
Answer key
- 3
- False
- colours code to help us
- <p>
- dog.jpg
- kite.png
- </p>
- <b>
- <body>
- 3
- School news
- Play games
- <h1>
- <ol>
- <h1>
- starts a new line
- 2
- opens it in a new tab
- <a href="about.html">
- 2
- False
- as one space
- </p>
- The full moon
- in the body
- saves our .html files
- an opening tag
- the body
- True
- href
- False
- <
- line 2
- a line across the page
- No
- <h5>
- False
- <h6>
- No
- shows pages from the web
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids