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 of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) riya2014 (d) Blue@Tiger_74
- 2.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
3.⚡ What number does this code print?
let books = 20;
books = books + 4;
books = books - 8;
console.log(books); -
4.✍️ Which property is set to red in this rule?
.note {
text-align: center;
color: red;
padding: 8px;
} (a) red (b) font-size (c) text-align (d) color -
5.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 280px;
padding: 15px;
border: 3px solid black;
margin: 0px;
} -
6.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 440px;
justify-content: center;
}
Inside are 4 boxes, each 100px wide (no margins). -
7.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>My pets</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h3>Fun facts</h3> - 8.Which of these is true of a web server? (a) shows pages from the web (b) is where we type code (c) stores a website’s files (d) shows line numbers
- 9.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) script.js (c) style.css
-
10.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 2 boxes, each 50px wide (no margins). - 11.What does font-weight do? (a) sets the letter colour (b) colours behind the text (c) centres a heading (d) makes the text bold
- 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 13.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
- 14.🛡️ Online: is it safe to ask before downloading? (a) not safe (b) safe
- 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) neither (c) the later one (d) the shorter one
- 16.🔍 Which is the odd one out? (a) shows a pop-up message (b) reacts to a button click (c) adds space around boxes (d) checks a quiz answer
- 17.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) doubles i (d) adds 1 to i
-
18.🔁 What does this code print?
let age = 3;
if (age >= 12) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 19.True or false: <li> shows bullet points. (a) True (b) False
- 20.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
- 21.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .html (d) .png
-
22.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 10px;
}
} -
23.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) dog.jpg (b) moon.png (c) A happy dog (d) bus.jpg -
24.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> - 25.True or false: <h1> goes in the head. (a) False (b) True
- 26.⚡ Which JavaScript word makes a new variable? (a) let (b) alert() (c) if (d) console.log()
- 27.⚡ What does JavaScript add to a web page? (a) the domain name (b) only colours (c) actions and changes (d) the page title
- 28.🧭 Which semantic tag sits at the very top? (a) <main> (b) <article> (c) <header> (d) <footer>
- 29.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
-
30.🔁 What does this code print?
let marks = 6;
if (marks >= 38) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass - 31.📄 Can HTML on its own make tables? (a) Yes (b) No
-
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width -
33.📄 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>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) Class 7 Blog (d) All about me - 34.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
- 35.🎯 Which element does the selector .box style? (a) <span class="box"> (b) <span class="star"> (c) <span id="box"> (d) <p class="menu">
- 36.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
-
37.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My pets</p>
<p>Fun facts</p>
<h4>Rain today</h4> - 38.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 39.🖌️ Which CSS property centres a heading? (a) font-size (b) font-family (c) font-weight (d) text-align
- 40.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) style.css (c) script.js
Answer key
- riya2014
- <a>
- 16
- color
- 316
- 20
- 3
- stores a website’s files
- style.css
- 70
- makes the text bold
- has a closing tag
- False
- safe
- the later one
- adds space around boxes
- adds 1 to i
- child
- False
- 6
- .html
- 12
- dog.jpg
- 1
- False
- let
- actions and changes
- <header>
- red
- Try again
- Yes
- Birthday cake
- All about me
- starts a new line
- <span class="box">
- <main>
- 2
- an empty tag
- text-align
- index.html
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids