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.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 2.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 3.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
-
4.🔍 One closing tag is missing. Which one?
<em>I love mangoes.</em>
<h1>My best friend</h1>
<b>Cricket is fun. (a) </strong> (b) </em> (c) </b> (d) </h1> - 5.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog -
7.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Rain today</p>
<h2>Hello, world!</h2> - 8.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
-
9.🔍 Which line is missing its closing tag?
line 1: <small>Hello, world!</small>
line 2: <h3>Fun facts
line 3: <p>Good morning!</p> (a) line 3 (b) line 2 (c) line 1 - 10.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
- 11.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 12.True or false: HTML on its own can keep a high score. (a) False (b) True
- 13.🏷️ Which is the closing tag for <b>? (a) <\b> (b) </b> (c) <b/> (d) <b>
- 14.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
-
15.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<!-- <p>My best friend</p> --> - 16.Which of these is an empty tag? (a) <title> (b) <hr> (c) <ul> (d) <b>
-
17.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) maths.html (d) href - 18.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
20.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<p>My pets</p> - 21.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 22.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
- 23.Which of these goes in the body? (a) <title> (b) <style> (c) <link rel="stylesheet"> (d) <table>
-
24.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 25.True or false: <style> goes in the head. (a) True (b) False
-
26.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 27.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 28.True or false: HTML on its own can pick a random number. (a) True (b) False
- 29.True or false: <a> goes in the body. (a) True (b) False
- 30.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
- 31.Which of these is true of a web browser? (a) opens web pages for us (b) hosts websites online (c) answers page requests (d) saves our .html files
-
32.🔍 One closing tag is missing. Which one?
<small>Hello, world!</small>
<h3>My best friend</h3>
<h2>Our school trip (a) </b> (b) </small> (c) </h2> (d) </h3> - 33.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 34.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 35.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
- 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
-
37.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) Map of India (b) Birthday cake (c) map.png (d) width -
38.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> -
39.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>Cricket is fun.</p> - 40.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
Answer key
- in the body
- a web server
- opens it in a new tab
- </b>
- False
- Birthday cake
- 2
- <h1>
- line 2
- <h6>
- a line across the page
- False
- </b>
- an attribute
- 1
- <hr>
- Take the quiz
- to leave notes
- Yes
- 2
- an opening tag
- <a>
- <table>
- numbers
- True
- 4
- No
- False
- True
- </head>
- opens web pages for us
- </h2>
- has a closing tag
- in the head
- <img>
- <h1>
- Map of India
- 350
- 3
- as one space
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids