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 this link open?
<a href="quiz.html">Maths fun</a> (a) in a new tab (b) in the same tab - 2.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
-
3.🔗 Where does this link open?
<a href="art.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
4.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Roses are red</p> - 5.📄 Can HTML on its own make a form? (a) Yes (b) No
-
6.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Banana</li>
</ol> -
7.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> (a) Rain today (b) Our school trip (c) My best friend (d) Good morning! -
8.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) map.png (b) cake.jpg (c) kite.png (d) A red kite - 9.📄 Can HTML on its own make headings? (a) No (b) Yes
-
10.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.
<small>My pets</small>
<u>Hello, world!</u> (a) </u> (b) </small> (c) </h1> (d) </h2> - 11.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
-
12.🔗 Which address opens when you click this link?
<a href="https://example.com">Contact us</a> (a) maths.html (b) Contact us (c) art.html (d) https://example.com - 13.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 14.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 15.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
- 16.🏷️ Which is the closing tag for <p>? (a) </p> (b) <\p> (c) <p/> (d) <p>
- 17.True or false: a code editor sends pages over the net. (a) False (b) True
-
18.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) Cricket is fun. (d) The red kite -
19.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p> (a) Hello, world! (b) Our school trip (c) Fun facts - 20.True or false: <title> goes in the body. (a) True (b) False
- 21.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
22.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h4>My pets</h4>
<h4>My best friend</h4>
<h2>Our school trip</h2>
<h4>The red kite</h4> - 23.True or false: a web server colours code to help us. (a) True (b) False
- 24.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <h6> (d) <br>
-
25.🔍 Which line is missing its closing tag?
line 1: <em>Our school trip</em>
line 2: <p>Fun facts</p>
line 3: <h1>My pets (a) line 2 (b) line 1 (c) line 3 -
26.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>The red kite</p> --> - 27.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
- 28.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) hosts websites online (d) turns HTML into a page
- 29.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 30.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) saves our .html files (d) colours code to help us
- 31.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
- 32.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 33.True or false: a web browser turns HTML into a page. (a) False (b) True
-
34.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>My pets</h2>
<h3>Hello, world!</h3>
<h2>Good morning!</h2> - 35.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) </head> (d) <body>
- 36.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
- 37.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
38.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<p>I love mangoes.</p> - 39.💬 Does the browser show comments on the page? (a) No (b) Yes
-
40.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) kite.png (b) fort.jpg (c) tiger.jpg (d) An old fort
Answer key
- in the same tab
- <h1>
- in a new tab
- 3
- Yes
- 2
- Good morning!
- kite.png
- Yes
- </h2>
- to leave notes
- https://example.com
- in the head
- opens it in a new tab
- src
- </p>
- False
- Cricket is fun.
- Hello, world!
- False
- in the body
- 5
- False
- <h1>
- line 3
- 1
- True
- hosts websites online
- Yes
- turns HTML into a page
- width
- True
- True
- 4
- <!DOCTYPE html>
- a web browser
- <ul>
- 2
- No
- fort.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids