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.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 90px;
padding: 30px;
border: 5px solid black;
margin: 5px;
} -
2.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="password">
<input type="text">
<input type="submit" value="Send">
</form> - 3.True or false: a web browser shows pages from the web. (a) True (b) False
- 4.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
5.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 30px;
}
} (a) No (b) Yes - 6.🔍 Which is the odd one out? (a) hosts websites online (b) turns HTML into a page (c) sends pages over the net (d) stores a website’s files
- 7.🌗 Is yellow on white easy or hard to read? (a) easy to read (b) hard to read
- 8.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 9.True or false: #top { color: blue; } goes in index.html. (a) True (b) False
-
10.🖌️ What colour is behind the letters?
li {
font-size: 28px;
background-color: blue;
text-align: left;
color: red;
} (a) red (b) blue (c) orange -
11.🔁 What is the LAST number this code prints?
for (let i = 0; i < 15; i = i + 2) {
console.log(i);
} - 12.♿ What does good colour contrast mean? (a) many bright colours (b) no colours at all (c) only red text (d) text stands out clearly
- 13.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
14.📊 How many cells does this table have in all?
<table>
<tr><td>Jamun</td><td>Mango</td><td>Jamun</td></tr>
<tr><td>Guava</td><td>Mango</td><td>Mango</td></tr>
<tr><td>Papaya</td><td>Grapes</td><td>Jamun</td></tr>
<tr><td>Litchi</td><td>Banana</td><td>Orange</td></tr>
</table> - 15.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <input> (d) <ol>
-
16.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 7; i++) {
total = total + 3;
}
console.log(total); - 17.🎯 What kind of selector is img? (a) a class selector (b) an id selector (c) an element selector
- 18.Which of these is safe to do online? (a) tell a trusted adult (b) meet an online stranger (c) download from pop-ups (d) click prize links
- 19.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) click it twice (c) close it, tell an adult (d) share it with friends
- 20.🎨 One CSS file can style how many pages? (a) only one image (b) no pages (c) only one word (d) many pages
-
21.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) Take the quiz (b) href (c) news.html (d) School news - 22.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) </strong> (d) <\strong>
- 23.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe
-
24.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) School news (b) about.html (c) contact.html (d) games.html -
25.🔁 What does this code print?
let marks = 28;
if (marks > 43) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again - 26.🧭 Is <nav> semantic or not semantic? (a) semantic (b) not semantic
- 27.True or false: in <img>, src names the picture file. (a) True (b) False
-
28.✍️ How many declarations (property: value pairs) are in this rule?
p {
font-size: 20px;
font-style: italic;
} -
29.⚡ What number does this code print?
let a = 5;
let b = 12;
console.log(a * b); -
30.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>Cricket is fun.</h2>
<h2>Our school trip</h2>
<p>Fun facts</p>
<h3>The red kite</h3> -
31.🔁 How many numbers does this code print?
for (let i = 0; i < 9; i = i + 2) {
console.log(i);
} - 32.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) index.html (c) My drawings (d) My Hobbies - 34.What does text-align do? (a) sets the letter colour (b) picks the font style (c) centres a heading (d) colours behind the text
- 35.💪 Which flexbox property sets space between boxes? (a) gap (b) justify-content (c) align-items (d) display: flex
-
36.🔁 What does this code print?
let age = 26;
if (age > 23) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 37.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
-
38.✍️ What value is given to font-size in this rule?
li {
font-size: 20px;
border: 2px solid;
margin: 10px;
width: 300px;
} (a) font-size (b) center (c) 20px (d) yellow - 39.🌗 Is black on white easy or hard to read? (a) easy to read (b) hard to read
- 40.Which colour pair is easy to read? (a) yellow on white (b) light grey on white (c) red on green (d) white on black
Answer key
- 170
- 4
- True
- has a closing tag
- Yes
- turns HTML into a page
- hard to read
- <ul>
- False
- blue
- 14
- text stands out clearly
- opens it in a new tab
- 12
- <form>
- 21
- an element selector
- tell a trusted adult
- close it, tell an adult
- many pages
- School news
- </strong>
- not safe
- games.html
- Try again
- semantic
- True
- 2
- 60
- 4
- 5
- 157
- My Hobbies
- centres a heading
- gap
- teen
- <a>
- 20px
- easy to read
- white on black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids