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 text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Rain today</p> (a) Good morning! (b) I love mangoes. (c) Hello, world! (d) Rain today - 2.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
- 3.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 4.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) Hot Tags (d) HyperText
- 5.True or false: <ul> is an ordered list. (a) True (b) False
- 6.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 8.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
9.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<h4>My pets</h4>
<h4>Our school trip</h4>
<p>The red kite</p> - 10.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 11.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 12.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
- 13.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
-
14.🔍 One closing tag is missing. Which one?
<h1>Fun facts</h1>
<i>Our school trip</i>
<b>Cricket is fun. (a) </u> (b) </h1> (c) </i> (d) </b> - 15.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
- 16.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="250"> - 18.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
19.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="250"> - 20.True or false: HTML on its own can count button clicks. (a) False (b) True
- 21.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 22.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
- 23.True or false: <ol> lists things in any order. (a) True (b) False
-
24.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) quiz.html (b) Art corner (c) Maths fun (d) href - 25.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 26.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
- 27.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 28.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
- 29.True or false: <ul> shows bullet points. (a) False (b) True
- 30.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) alt (c) width (d) src
- 31.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
- 32.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 33.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
- 34.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h2>? (a) <h1> (b) <h6> (c) <h4> (d) <h2>
- 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
36.🔗 Which words do you click on?
<a href="art.html">Maths fun</a> (a) art.html (b) href (c) Art corner (d) Maths fun - 37.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
- 38.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100">
Answer key
- Good morning!
- <ol>
- Yes
- HyperText
- False
- an empty tag
- in the head
- in the head
- 3
- a code editor
- Yes
- False
- <!--
- </b>
- alt
- <img>
- 250
- an opening tag
- 250
- False
- <ul>
- <h6>
- False
- Maths fun
- 1
- <h5>
- a web server
- <h5>
- True
- width
- a paragraph
- False
- <li>
- <h6>
- Yes
- Maths fun
- an attribute
- an opening tag
- to describe the image
- 100
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids