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 does this code show?
let name = "Aman";
alert("Welcome, " + name + "!"); (a) Welcome, name! (b) Aman (c) name (d) Welcome, Aman! - 2.🌍 Which one shows the page to you? (a) HTTPS (b) the URL (c) the server (d) the browser
- 3.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) index.html (c) script.js
- 4.True or false: a web server sends pages over the net. (a) False (b) True
- 5.📊 Which tag holds the whole table? (a) <caption> (b) <table> (c) <td> (d) <th>
- 6.🎯 Which element does the selector h2 style? (a) <div class="note"> (b) <h2 class="note"> (c) <span id="top"> (d) <li>
- 7.True or false: p is an element selector. (a) True (b) False
- 8.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
-
9.🔁 How many times does this code print “Hello”?
for (let i = 0; i < 3; i++) {
console.log("Hello");
} -
10.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Planets (c) My Hobbies (d) Thanks for visiting. - 11.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
- 12.🌈 Which colour is #ff0000? (a) bright green (b) white (c) cyan (d) red
-
13.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h2> → <h2> (a) Yes (b) No - 14.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 15.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
-
16.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.com/news/today.html (a) Yes (b) No -
17.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 480px) {
p {
font-size: 24px;
}
} - 18.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 19.True or false: <aside> holds extra side notes. (a) True (b) False
- 20.🌈 Which hex code is magenta? (a) #0000ff (b) #ff0000 (c) #00ffff (d) #ff00ff
- 21.🧩 Which language counts down a timer? (a) CSS (b) JavaScript (c) HTML
- 22.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
23.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 170px;
justify-content: flex-end;
}
Inside are 2 boxes, each 60px wide (no margins). -
24.⚖️ What colour is the text of this element?
<h1 class="note" id="main">Hi</h1>
CSS:
h1 { color: blue; }
h1 { color: green; } (a) blue (b) orange (c) green (d) black -
25.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) My Hobbies (b) Try this poha. (c) body (d) Easy snacks - 26.🔗 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
- 27.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 28.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 29.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
- 30.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
- 31.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 32.🌈 Which colour is #00ffff? (a) white (b) cyan (c) blue (d) magenta
- 33.Which of these is a strong password? (a) Mango#Kite29! (b) qwerty (c) iloveyou (d) password
- 34.🔁 What does i++ do? (a) adds 1 to i (b) takes 1 from i (c) doubles i (d) prints i
- 35.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
- 36.Which of these is true of <main>? (a) sits at the very top (b) holds the main content (c) holds copyright notes (d) holds a side box of tips
- 37.True or false: in <img>, width tells which image to load. (a) True (b) False
- 38.True or false: HTML on its own cannot make a form. (a) False (b) True
- 39.True or false: HTML rounds box corners. (a) True (b) False
- 40.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) flex-start (c) space-between (d) center
Answer key
- Welcome, Aman!
- the browser
- index.html
- True
- <table>
- <h2 class="note">
- True
- starts a new line
- 3
- My Hobbies
- element
- red
- Yes
- No
- hard to read
- Yes
- 20
- in the body
- True
- #ff00ff
- JavaScript
- <!DOCTYPE html>
- 50
- green
- Easy snacks
- opens it in a new tab
- blue
- False
- #0000ff
- a web browser
- an opening tag
- cyan
- Mango#Kite29!
- adds 1 to i
- <h6>
- holds the main content
- False
- False
- False
- flex-start
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids