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.🎯 Which element does the selector #top style? (a) <h2 class="top"> (b) <h2 id="top"> (c) <h2 id="intro"> (d) <li class="red">
- 2.⚡ Which JavaScript word shows a pop-up box? (a) let (b) console.log() (c) if (d) alert()
- 3.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 4.🔍 Which is the odd one out? (a) reacts to a button click (b) checks a quiz answer (c) changes the text size (d) shows a pop-up message
-
5.🔁 What does this code print?
let age = 32;
if (age > 27) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 6.True or false: <ul> lists steps in order. (a) True (b) False
- 7.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
- 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
9.🌍 What is the domain name in this URL?
http://school.example.in/art/gallery.html (a) www.example.net (b) /art/gallery.html (c) http (d) school.example.in -
10.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
11.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<p>I love mangoes.</p> -
12.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) dog.jpg (b) Birthday cake (c) cake.jpg (d) moon.png - 13.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 14.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) <html> (b) </head>
- 15.🧭 Is <div> semantic or not semantic? (a) semantic (b) not semantic
-
16.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) Cricket is fun. (b) The red kite (c) My pets - 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
18.🖌️ What colour are the letters?
h2 {
color: orange;
text-align: right;
font-size: 28px;
background-color: black;
} (a) black (b) orange (c) purple - 19.True or false: to tell a trusted adult is not safe. (a) False (b) True
-
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) All about me (b) index.html (c) My Hobbies (d) Mars is red. -
21.🖌️ How big is the text, in px?
h1 {
color: green;
background-color: blue;
font-size: 16px;
text-align: center;
} -
22.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Our school trip</h2>
<h2>The red kite</h2>
<p>Fun facts</p>
<h2>My pets</h2> -
23.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 24.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
-
25.✍️ Which property is set to 300px in this rule?
.box {
border: 2px solid;
text-align: center;
width: 300px;
} (a) color (b) 300px (c) width (d) font-style -
26.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) news.html (b) art.html (c) Visit the site (d) maths.html - 27.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
-
28.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 290px;
justify-content: center;
}
Inside are 3 boxes, each 50px wide (no margins). -
29.🔁 How many times does this code print “Hi”?
for (let i = 2; i < 8; i++) {
console.log("Hi");
} - 30.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
- 31.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Link (d) Laptop
- 32.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) All about me (b) I like to read. (c) Cricket Club (d) index.html - 34.Which colour pair is hard to read? (a) dark grey on white (b) white on dark blue (c) white on black (d) blue on purple
- 35.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
- 36.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) align-items (c) display: flex (d) justify-content
-
37.📊 How many rows does this table have?
<table>
<tr><td>Banana</td><td>Papaya</td></tr>
<tr><td>Papaya</td><td>Jamun</td></tr>
</table> -
38.🖌️ What colour are the letters?
h1 {
text-align: center;
color: green;
font-size: 36px;
background-color: orange;
} (a) red (b) orange (c) green - 39.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
-
40.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 120px;
padding: 30px;
border: 1px solid black;
margin: 10px;
}
Answer key
- <h2 id="top">
- alert()
- No
- changes the text size
- teen
- False
- <h1>
- No
- school.example.in
- bullets
- 1
- cake.jpg
- has a closing tag
- <html>
- not semantic
- Cricket is fun.
- Yes
- orange
- False
- My Hobbies
- 16
- 2
- No
- <ul>
- width
- maths.html
- <ul>
- 70
- 6
- not safe
- Language
- <ul>
- Cricket Club
- blue on purple
- <
- justify-content
- 2
- green
- <!--
- 202
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids