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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 2.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
- 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
4.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 110px;
padding: 10px;
border: 2px solid black;
margin: 0px;
} -
5.⚡ What number does this code print?
let a = 13;
let b = 37;
console.log(a + b); -
6.⚡ What does this code print? (Look at the quotes!)
let x = "7";
let y = 6;
console.log(x + y); (a) Error (b) 13 (c) 76 -
7.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} (a) Yes (b) No - 8.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
- 9.What does text-align do? (a) picks the font style (b) colours behind the text (c) centres a heading (d) sets the letter colour
-
10.🔁 What is the LAST number this code prints?
for (let i = 0; i < 19; i = i + 3) {
console.log(i);
} - 11.True or false: body { margin: 0; } goes in script.js. (a) True (b) False
- 12.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
- 13.🌈 Which colour of light is strongest in rgb(78, 175, 65)? (a) red (b) green (c) blue
- 14.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
-
15.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in the same tab (b) in a new tab -
16.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) Take the quiz (b) href (c) School news (d) maths.html - 17.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) </head>
- 18.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="150"> (a) Map of India (b) kite.png (c) A red kite (d) width -
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) Here is my best one. (c) body (d) Class 7 Blog - 21.🛡️ Online: is it safe to use a strong password? (a) safe (b) not safe
- 22.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
- 23.🔢 When you open a web page, which comes LAST? (a) the browser shows it (b) the server sends files (c) you type the URL (d) DNS finds the server
-
24.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 180px;
padding: 10px;
border: 3px solid black;
margin: 20px;
} - 25.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <p> (d) <input>
-
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) An old fort (b) width (c) Our school bus (d) bus.jpg -
27.⚡ What number does this code print?
let runs = 15;
runs = runs + 15;
runs = runs - 1;
console.log(runs); -
28.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>Hello, world!</p>
<p>My pets</p>
<h2>Fun facts</h2> - 29.True or false: to keep passwords secret is safe. (a) True (b) False
- 30.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) < > (d) { }
- 31.🎯 Which element does the selector div style? (a) <p class="star"> (b) <span> (c) <h1 id="hero"> (d) <div class="star">
- 32.True or false: <a href="a.html">Go</a> goes in script.js. (a) True (b) False
- 33.🔁 When does the else part run? (a) when if is true (b) always (c) when if is false (d) never
- 34.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) bright green (d) red
- 36.What does font-family do? (a) colours behind the text (b) makes the text bold (c) centres a heading (d) picks the font style
- 37.True or false: the URL is the page’s address. (a) True (b) False
- 38.True or false: a web browser stores a website’s files. (a) False (b) True
- 39.📦 In the box model, which part is the gap to other boxes? (a) padding (b) content (c) border (d) margin
- 40.🧩 Which language checks a quiz answer? (a) CSS (b) HTML (c) JavaScript
Answer key
- in the head
- weak
- has a closing tag
- 134
- 50
- 76
- Yes
- href
- centres a heading
- 18
- False
- alt
- green
- makes it harder
- in the same tab
- School news
- <!DOCTYPE html>
- screen-reader users
- A red kite
- Easy snacks
- safe
- False
- the browser shows it
- 246
- <textarea>
- Our school bus
- 29
- 3
- True
- { }
- <div class="star">
- False
- when if is false
- <ul>
- bright green
- picks the font style
- True
- False
- margin
- JavaScript
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids