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.True or false: in <img>, alt tells which image to load. (a) True (b) False
- 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 3.True or false: <h1> goes in the head. (a) True (b) False
-
4.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>Fun facts</p> (a) Rain today (b) I love mangoes. (c) My best friend (d) Fun facts - 5.Which of these is true of a code editor? (a) turns HTML into a page (b) colours code to help us (c) opens web pages for us (d) hosts websites online
- 6.Which of these has a closing tag? (a) <br> (b) <h1> (c) <meta> (d) <img>
- 7.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
-
8.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<h2>Our school trip</h2> - 9.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 10.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
- 11.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
-
12.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 14.True or false: in <img>, width names the picture file. (a) True (b) False
- 15.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
- 16.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
- 17.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <h3> (d) <\h3>
- 18.💬 Does the browser show comments on the page? (a) Yes (b) No
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg - 20.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
- 21.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
- 22.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
-
23.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) I love mangoes. - 24.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
- 25.📄 Can HTML on its own make headings? (a) Yes (b) No
- 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 27.True or false: HTML on its own can make tables. (a) False (b) True
- 28.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
- 29.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <a>
- 30.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 31.Which of these is an opening tag? (a) </h1> (b) </li> (c) </p> (d) <li>
-
32.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!</h1>
line 2: <em>Rain today</em>
line 3: <h3>The red kite (a) line 2 (b) line 1 (c) line 3 - 33.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
- 34.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 35.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
36.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) bus.jpg (b) moon.png (c) A happy dog (d) dog.jpg - 37.Which of these is an opening tag? (a) </body> (b) </h1> (c) <p> (d) </p>
- 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.True or false: <input> has a closing tag. (a) True (b) False
- 40.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
Answer key
- False
- Yes
- False
- Rain today
- colours code to help us
- <h1>
- <ul>
- 2
- Yes
- <img>
- <h1>
- in a new tab
- Yes
- False
- opens it in a new tab
- <!DOCTYPE html>
- </h3>
- No
- A tiger asleep
- a web browser
- <h1>
- <a href="about.html">
- I love mangoes.
- <h1>
- Yes
- No
- True
- <h6>
- <a>
- a closing tag
- <li>
- line 3
- href
- 6
- in the head
- dog.jpg
- <p>
- an opening tag
- False
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids