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 show on the page?
<!-- <p>My pets</p> -->
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> - 2.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) is where we type code (d) turns HTML into a page
- 3.True or false: <img> goes in the head. (a) True (b) False
-
4.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> (a) Rain today (b) I love mangoes. (c) Good morning! - 5.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
-
6.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
<li>Banana</li>
</ol> -
7.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Kites fly high</p> - 8.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
- 9.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
- 10.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
- 11.Which of these is true of a code editor? (a) opens web pages for us (b) turns HTML into a page (c) is where we type code (d) answers page requests
- 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 13.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 14.Which of these is true of a web server? (a) shows line numbers (b) turns HTML into a page (c) has an address bar (d) sends pages over the net
- 15.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
- 16.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
-
17.🔍 Which line is missing its closing tag?
line 1: <h3>I love mangoes.</h3>
line 2: <p>Our school trip</p>
line 3: <small>Fun facts (a) line 1 (b) line 3 (c) line 2 - 18.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
-
19.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> - 20.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 21.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Planets (c) Cricket Club (d) Here is my best one. - 23.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
-
24.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 25.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
26.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<h2>Rain today</h2>
<p>Rain today</p>
<p>Good morning!</p> -
27.🔗 Which address opens when you click this link?
<a href="quiz.html">Play games</a> (a) about.html (b) Play games (c) games.html (d) quiz.html -
28.🔍 One closing tag is missing. Which one?
<u>Our school trip</u>
<small>Rain today</small>
<h2>Fun facts (a) </h2> (b) </small> (c) </i> (d) </u> - 29.True or false: in <img>, alt describes the picture. (a) True (b) False
- 30.🔠 Are headings shown in bold by default? (a) Yes (b) No
-
31.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="200"> - 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
33.🔗 Where does this link open?
<a href="news.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
34.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>My pets</p> --> (a) My pets (b) The red kite (c) Fun facts (d) Good morning! - 35.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
36.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My best friend</p>
<p>My best friend</p>
<p>Our school trip</p>
<h2>My pets</h2> -
37.🔗 Where does this link open?
<a href="about.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab -
38.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Take the quiz (c) art.html (d) news.html - 39.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
40.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> (a) My best friend (b) Good morning! (c) I love mangoes. (d) Hello, world!
Answer key
- 2
- turns HTML into a page
- False
- Rain today
- <li>
- 5
- 5
- <h5>
- <h1>
- the body
- is where we type code
- Yes
- True
- sends pages over the net
- </h2>
- </u>
- line 3
- to leave notes
- 400
- an empty tag
- src
- Cricket Club
- <html>
- A happy dog
- an opening tag
- 3
- quiz.html
- </h2>
- True
- Yes
- 200
- <ol>
- in the same tab
- My pets
- <h6>
- 2
- in a new tab
- maths.html
- a web browser
- I love mangoes.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids