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.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
-
2.🔗 Which words do you click on?
<a href="about.html">Play games</a> (a) href (b) Play games (c) About us (d) about.html - 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 4.True or false: in <img>, alt shows if the image fails. (a) False (b) True
-
5.🔍 One closing tag is missing. Which one?
<strong>Hello, world!</strong>
<u>I love mangoes.
<b>Our school trip</b> (a) </b> (b) </u> (c) </strong> (d) </p> - 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
- 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
-
8.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>Rain today</p> - 9.Which of these is true of a code editor? (a) sends pages over the net (b) turns HTML into a page (c) shows line numbers (d) opens web pages for us
- 10.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) sound (d) structure
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> - 12.Which of these is true of a web browser? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) opens web pages for us
-
13.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> --> (a) Hello, world! (b) My pets (c) Our school trip -
14.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Hello, world!</h2>
<p>My pets</p> - 15.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) saves our .html files (d) answers page requests
- 16.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
- 17.True or false: <li> goes inside ul or ol. (a) True (b) False
- 18.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
19.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) dog.jpg (b) width (c) The full moon (d) A happy dog - 21.True or false: <p> goes in the body. (a) True (b) False
- 22.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
- 23.True or false: <title> goes in the head. (a) False (b) True
- 24.True or false: a web server is where we type code. (a) False (b) True
-
25.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) games.html (b) news.html (c) Play games (d) quiz.html - 26.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
- 27.True or false: <title> goes in the body. (a) True (b) False
- 28.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>
- 29.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
- 30.Which of these has a closing tag? (a) <p> (b) <meta> (c) <br> (d) <hr>
-
31.🔗 Which address opens when you click this link?
<a href="art.html">Contact us</a> (a) quiz.html (b) news.html (c) art.html (d) Contact us -
32.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Our school trip</h4>
<h3>I love mangoes.</h3>
<h3>The red kite</h3>
<p>My pets</p> - 33.True or false: HTML on its own can keep a high score. (a) False (b) True
- 34.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
-
36.🔍 One closing tag is missing. Which one?
<h1>My pets
<i>Our school trip</i>
<strong>I love mangoes.</strong> (a) </u> (b) </h1> (c) </strong> (d) </i> - 37.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
- 38.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 39.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
-
40.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) games.html (b) news.html (c) About us (d) quiz.html
Answer key
- opens it in a new tab
- Play games
- an empty tag
- True
- </u>
- <h1>
- <h1>
- 3
- shows line numbers
- structure
- 50
- opens web pages for us
- My pets
- 2
- saves our .html files
- True
- True
- an empty tag
- 2
- A happy dog
- True
- <ul>
- True
- False
- news.html
- <h2>
- False
- <h1>
- <!--
- <p>
- art.html
- 4
- False
- in the body
- as one space
- </h1>
- a paragraph
- to leave notes
- <img>
- news.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids