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.📋 What number does the browser show next to “Guava”?
<ol start="4">
<li>Orange</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 2.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
- 3.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 4.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 5.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
- 6.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
- 7.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
-
8.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> - 9.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 10.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 11.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
-
13.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
</ol> - 14.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
15.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<h2>My best friend</h2> -
16.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<h2>Hello, world!</h2>
<p>Good morning!</p>
<h2>Cricket is fun.</h2>
<p>Fun facts</p> -
17.🔍 Which line is missing its closing tag?
line 1: <b>Rain today
line 2: <h1>Hello, world!</h1>
line 3: <small>Cricket is fun.</small> (a) line 3 (b) line 2 (c) line 1 - 18.True or false: <title> has a closing tag. (a) False (b) True
- 19.Which of these is an opening tag? (a) </title> (b) <h1> (c) </body> (d) </p>
- 20.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) colours code to help us (d) sends pages over the net
- 21.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
- 22.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
- 23.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
-
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Rivers flow<br>Sky is blue</p> - 25.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 26.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h1> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
-
27.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png - 28.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
- 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
31.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) Visit the site (b) about.html (c) Contact us (d) href - 32.Which of these is true of a web server? (a) has an address bar (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
- 33.True or false: <ul> goes in the body. (a) True (b) False
-
34.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Cricket Club (c) Try this poha. (d) All about me - 35.True or false: in <img>, width names the picture file. (a) True (b) False
- 36.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 37.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 38.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) turns HTML into a page (d) shows pages from the web
-
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Cricket Club (c) I like to read. (d) Easy snacks -
40.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) I love mangoes. (b) Cricket is fun. (c) My pets (d) Good morning!
Answer key
- 6
- starts a new line
- <a>
- True
- src
- a code editor
- 1
- 2
- <ol>
- True
- a closing tag
- <h5>
- 3
- an opening tag
- 2
- 4
- line 1
- True
- <h1>
- opens web pages for us
- a slash /
- <li>
- True
- 4
- False
- <h1>
- tiger.jpg
- <h3>
- Yes
- Yes
- Contact us
- stores a website’s files
- True
- All about me
- False
- in the body
- an opening tag
- shows line numbers
- Cricket Club
- My pets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids