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 pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="150"> - 2.True or false: <ul> shows bullet points. (a) True (b) False
- 3.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 4.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) My Hobbies (c) index.html (d) Thanks for visiting. - 6.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
- 7.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
- 8.True or false: a web browser shows pages from the web. (a) True (b) False
- 9.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
- 10.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 12.Which of these is an opening tag? (a) <title> (b) </title> (c) </body> (d) </h1>
-
13.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> --> - 14.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
- 15.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h2>
-
16.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> - 17.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
- 18.True or false: a code editor opens web pages for us. (a) True (b) False
- 19.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
20.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Jamun</li>
</ul> - 21.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 22.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 23.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.🔍 One closing tag is missing. Which one?
<i>Fun facts</i>
<b>Rain today</b>
<h3>Good morning! (a) </i> (b) </h3> (c) </b> (d) </h2> -
25.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="400"> - 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 27.True or false: <title> has a closing tag. (a) True (b) False
-
28.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<h4>Hello, world!</h4>
<p>Fun facts</p> - 29.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
-
30.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) games.html (c) Contact us (d) href -
31.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Good morning!</p>
<p>My best friend</p> (a) The red kite (b) Good morning! (c) My best friend -
32.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 33.True or false: <h1> is an empty tag. (a) False (b) True
- 34.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 35.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 36.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
37.🔍 One closing tag is missing. Which one?
<u>Our school trip</u>
<h2>I love mangoes.
<i>Hello, world!</i> (a) </h3> (b) </u> (c) </i> (d) </h2> - 38.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
-
39.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="300"> (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png - 40.True or false: HTML on its own can count button clicks. (a) False (b) True
Answer key
- 150
- True
- <a href="about.html">
- 6
- My Hobbies
- to leave notes
- <a>
- True
- <h1>
- <h1>
- numbers
- <title>
- 1
- a code editor
- <h6>
- 2
- <h1>
- False
- opens it in a new tab
- 2
- href
- No
- an empty tag
- </h3>
- 400
- Yes
- True
- 2
- <h6>
- Contact us
- The red kite
- in a new tab
- False
- Yes
- <ol>
- <ol>
- </h2>
- <h5>
- moon.png
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids