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 attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
-
2.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 20px;
}
} (a) No (b) Yes - 3.True or false: the URL is the page’s address. (a) True (b) False
- 4.Which of these does JavaScript do? (a) makes a link (b) makes headings and lists (c) gives the page structure (d) shows a pop-up message
-
5.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="checkbox">
<input type="email">
<input type="text">
<input type="submit" value="Send">
</form> - 6.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h3>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
-
7.⚖️ What colour is the text of this element?
<p class="red" id="logo">Hi</p>
CSS:
.red { color: white; }
.red { color: yellow; } (a) black (b) yellow (c) orange (d) white - 8.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
9.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<p>My pets</p> -
10.🔁 What does this code print?
let score = 19;
if (score >= 29) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 11.Which of these is margin? (a) the text or picture (b) space outside the border (c) a solid or dotted edge (d) space inside the border
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Planets (c) index.html (d) Art Gallery - 13.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 14.🎨 Which attribute adds CSS inside one tag? (a) src (b) style (c) alt (d) href
- 15.True or false: <li> goes inside ul or ol. (a) True (b) False
- 16.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 17.🎯 Which sign starts a class selector? (a) & (b) . (c) # (d) @
-
18.⚡ What number does this code print?
let a = 4;
let b = 6;
console.log(a * b); - 19.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
-
20.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 480px) {
p {
font-size: 10px;
}
} - 21.True or false: “link text “click here”” makes the page harder to use. (a) False (b) True
- 22.What is <input type="password"> for? (a) lets you pick only one (b) hides what you type (c) lets you tick many (d) is for one line of words
-
23.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> - 24.True or false: img is a class selector. (a) True (b) False
- 25.🛡️ Online: is it safe to tell a trusted adult? (a) safe (b) not safe
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) Class 7 Blog (c) All about me (d) Here is my best one. -
27.✍️ Which property is set to 300px in this rule?
h2 {
width: 300px;
text-align: center;
font-weight: bold;
} (a) width (b) color (c) font-style (d) 300px - 28.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
- 29.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) alt (d) height
- 30.📦 In the box model, which part is space outside the border? (a) margin (b) border (c) content (d) padding
-
31.📋 What number does the browser show next to “Jamun”?
<ol start="7">
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 32.✍️ Which sign ends each CSS declaration? (a) . (b) , (c) ; (d) :
- 33.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
- 34.🎯 Which element does the selector .menu style? (a) <h1 class="menu"> (b) <h1 id="menu"> (c) <h2 class="big"> (d) <h1 class="note">
- 35.Which of these goes in the head? (a) <h1> (b) <img> (c) <table> (d) <style>
-
36.🔁 How many numbers does this code print?
for (let i = 0; i < 15; i = i + 2) {
console.log(i);
} - 37.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
38.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) I like to read. (c) My drawings (d) Space Facts - 39.Which colour pair is hard to read? (a) yellow on black (b) dark grey on white (c) white on dark blue (d) red on green
-
40.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 1024px) {
p {
font-size: 28px;
}
}
Answer key
- height
- Yes
- True
- shows a pop-up message
- 5
- <h2>
- yellow
- has a closing tag
- 2
- Play again
- space outside the border
- Art Gallery
- <ol>
- style
- True
- has a closing tag
- .
- 24
- red
- 10
- True
- hides what you type
- 2
- False
- safe
- All about me
- width
- not safe
- src
- margin
- 9
- ;
- text stands out clearly
- <h1 class="menu">
- <style>
- 8
- a web browser
- Space Facts
- red on green
- 24
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids