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.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
2.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) My pets (c) Hello, world! -
3.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in a new tab (b) in the same tab - 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
- 5.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
- 6.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
- 7.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
- 8.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) width (d) src
-
9.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Cricket is fun. (b) Hello, world! (c) Rain today -
10.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) Rain today (c) Cricket is fun. - 11.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) An old fort (b) bus.jpg (c) Our school bus (d) width - 13.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 14.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
-
15.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg -
16.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> --> -
17.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) My best friend (c) Our school trip -
18.🔍 Which line is missing its closing tag?
line 1: <p>Cricket is fun.
line 2: <small>Our school trip</small>
line 3: <h3>I love mangoes.</h3> (a) line 3 (b) line 1 (c) line 2 -
19.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<h2>Good morning!
<b>Rain today</b> (a) </h2> (b) </h1> (c) </u> (d) </b> -
20.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) href (b) Art corner (c) School news (d) https://example.com - 21.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
- 22.Which of these is true of a web server? (a) opens web pages for us (b) turns HTML into a page (c) sends pages over the net (d) is where we type code
- 23.🖼️ Which attribute of <img> describes the picture? (a) src (b) alt (c) width (d) height
-
24.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
25.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> - 26.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
- 27.Which of these is an opening tag? (a) </li> (b) </b> (c) <h1> (d) </body>
-
28.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Fun facts</p>
<!-- <p>My pets</p> --> (a) Cricket is fun. (b) My pets (c) Rain today (d) Fun facts -
29.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high</p> - 30.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 31.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 32.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 33.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
-
34.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Orange</li>
</ol> (a) numbers (b) bullets - 35.True or false: <title> goes in the body. (a) True (b) False
- 36.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) opens web pages for us (d) has an address bar
-
37.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Orange</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 38.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
- 39.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 40.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
Answer key
- <ul>
- Cricket is fun.
- in the same tab
- <h5>
- a code editor
- shows pages from the web
- <h1>
- alt
- Rain today
- Cricket is fun.
- <li>
- Our school bus
- Markup
- <a href="about.html">
- dog.jpg
- 1
- My best friend
- line 1
- </h2>
- Art corner
- src
- sends pages over the net
- alt
- in a new tab
- 2
- <h1>
- <h1>
- My pets
- 2
- a web server
- True
- an opening tag
- 1
- numbers
- False
- shows line numbers
- numbers
- a web browser
- <ul>
- width
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids