Web Development Worksheet: Final Test
Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.
NameDateTime takenScore ___ / 40
-
1.🔍 One closing tag is missing. Which one?
<h3>My best friend</h3>
<h1>Rain today</h1>
<b>I love mangoes. (a) </h1> (b) </h3> (c) </em> (d) </b> - 2.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) <em/> (d) </em>
-
3.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg -
4.🎯 Which CSS selector matches this element?
<p class="box" id="top">Hello</p> (a) p (b) .star (c) h1 (d) #box -
5.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) kite.png (b) map.png (c) cake.jpg (d) A red kite - 6.🌍 Which one shows the page to you? (a) the server (b) the browser (c) the URL (d) HTTPS
- 7.🚀 What is the home page file of a website usually called? (a) main.png (b) home.css (c) start.js (d) index.html
- 8.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
-
9.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Mango</li>
</ol> -
10.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Space Facts (b) Planets (c) Here is my best one. (d) body - 11.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
12.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 10px;
}
} - 13.True or false: “add alt text to images” helps everyone use the page. (a) False (b) True
-
14.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + 7;
}
console.log(total); -
15.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p> - 16.True or false: <header> sits at the very top. (a) True (b) False
- 17.True or false: HTML on its own cannot make tables. (a) False (b) True
- 18.🎨 Which tag connects an outside CSS file? (a) <css> (b) <link> (c) <a> (d) <img>
- 19.True or false: “write clear link text” makes the page harder to use. (a) False (b) True
- 20.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) the later one (c) neither (d) the shorter one
- 21.True or false: <li> has a closing tag. (a) True (b) False
- 22.True or false: <article> holds a news story. (a) True (b) False
- 23.🧩 Which language makes a link? (a) JavaScript (b) HTML (c) CSS
- 24.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 25.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
- 26.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <footer> (b) <nav> (c) <header>
- 27.Which of these does JavaScript do? (a) shows a pop-up message (b) puts a picture on a page (c) sets colours and fonts (d) changes the text size
-
28.⚖️ What colour is the text of this element?
<p class="box" id="hero">Hi</p>
CSS:
#hero { color: orange; }
#hero { color: purple; } (a) black (b) white (c) orange (d) purple - 29.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
- 30.Which of these does CSS do? (a) reacts to a button click (b) shows a pop-up message (c) rounds box corners (d) counts down a timer
- 31.🛡️ Online: is it safe to think before you post? (a) safe (b) not safe
-
32.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Guava</td><td>Litchi</td><td>Guava</td><td>Banana</td></tr>
</table> -
33.📋 What number does the browser show next to “Litchi”?
<ol start="4">
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 34.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
35.🔁 What does this code print?
let age = 17;
if (age > 19) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen -
36.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) About us (c) href (d) art.html - 37.🔍 Which is the odd one out? (a) colours code to help us (b) answers page requests (c) is where we type code (d) saves our .html files
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
39.🎯 Which CSS selector matches this element?
<h2 class="red" id="end">Hello</h2> (a) .box (b) .end (c) #hero (d) #end -
40.📋 What number does the browser show next to “Guava”?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Guava</li>
</ol>
Answer key
- </b>
- </em>
- bus.jpg
- p
- kite.png
- the browser
- index.html
- on the browser tab
- 2
- Planets
- in the body
- 12
- True
- 21
- 1
- True
- False
- <link>
- False
- the later one
- True
- True
- HTML
- width
- a web browser
- <footer>
- shows a pop-up message
- purple
- starts a new line
- rounds box corners
- safe
- 8
- 6
- <li>
- child
- About us
- answers page requests
- 300
- #end
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids