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.⚖️ What colour is the text of this element?
<p class="big" id="hero">Hi</p>
CSS:
.big { color: red; }
#hero { color: blue; } (a) blue (b) black (c) green (d) red - 2.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) weak (b) strong
-
3.🔁 What is the LAST number this code prints?
for (let i = 0; i < 9; i = i + 4) {
console.log(i);
} -
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) index.html (c) Match report (d) Here is my best one. -
5.⚖️ What colour is the text of this element?
<h1 class="big" id="intro">Hi</h1>
CSS:
h1 { color: blue; }
h1 { color: red; } (a) orange (b) blue (c) red (d) green - 6.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 7.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #0000ff
-
8.🔁 How many times does this code print “Well done”?
for (let i = 1; i < 8; i++) {
console.log("Well done");
} - 9.🖌️ Which CSS property picks the font style? (a) font-weight (b) color (c) font-family (d) text-align
- 10.🌗 Is dark grey on white easy or hard to read? (a) hard to read (b) easy to read
- 11.📄 Can HTML on its own make headings? (a) No (b) Yes
-
12.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) about.html (b) Maths fun (c) games.html (d) contact.html - 13.True or false: in <img>, height sets how wide it is. (a) False (b) True
- 14.🔢 When you open a web page, what comes right after “the server sends files”? (a) the browser shows it (b) DNS finds the server (c) you type the URL (d) the browser asks it
-
15.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) games.html (b) Maths fun (c) news.html (d) quiz.html -
16.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 10px;
}
} (a) Yes (b) No -
17.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 1024px) {
p {
font-size: 22px;
}
} - 18.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #000000
- 19.📦 In the box model, which part is the text or picture? (a) content (b) padding (c) border (d) margin
-
20.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Rain today</h2>
<p>Cricket is fun.</p> -
21.🔁 How many times does this code print “Hello”?
for (let i = 1; i <= 6; i++) {
console.log("Hello");
} - 22.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #00ffff (d) #000000
-
23.🔁 What does this code print?
let age = 48;
if (age < 30) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 24.Which of these is true of <article>? (a) holds one blog post (b) holds the menu of links (c) holds a side box of tips (d) is the page’s key part
-
25.🔍 Which line is missing its closing tag?
line 1: <u>My pets</u>
line 2: <b>Our school trip</b>
line 3: <h1>Fun facts (a) line 3 (b) line 2 (c) line 1 -
26.⚡ What does this code show?
let name = "Arjun";
alert("Hello, " + name + "!"); (a) Arjun (b) Hello, name! (c) name (d) Hello, Arjun! - 27.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
- 28.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <footer> (b) <main> (c) <nav> (d) <header>
- 29.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 30.True or false: to check for https first is safe. (a) True (b) False
- 31.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) for (d) let
- 32.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) style.css (c) index.html
-
33.🔁 How many times does this code print “Welcome”?
for (let i = 0; i <= 2; i++) {
console.log("Welcome");
} - 34.True or false: <img> goes in the body. (a) True (b) False
- 35.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 36.🔢 When you open a web page, which comes first: “the server sends files” or “DNS finds the server”? (a) the server sends files (b) DNS finds the server
- 37.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
-
38.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="300"> (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png - 39.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
-
40.🔁 How many times does this code print “Hello”?
for (let i = 2; i <= 9; i++) {
console.log("Hello");
}
Answer key
- blue
- strong
- 8
- Riya’s Recipes
- red
- <a href="about.html">
- #00ffff
- 7
- font-family
- easy to read
- Yes
- games.html
- False
- the browser shows it
- news.html
- Yes
- 22
- #00ff00
- content
- 2
- 6
- #ffffff
- child
- holds one blog post
- line 3
- Hello, Arjun!
- as one space
- <header>
- 6
- True
- for
- style.css
- 3
- True
- No
- DNS finds the server
- a web browser
- moon.png
- hard to read
- 8
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids