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) iloveyou (c) Mango#Kite29! (d) Rain#Drop_42!
-
2.🖌️ How big is the text, in px?
h1 {
background-color: green;
text-align: left;
font-size: 16px;
color: orange;
} - 3.🌈 Which colour is #ffff00? (a) red (b) cyan (c) blue (d) yellow
- 4.True or false: the URL shows the page to you. (a) True (b) False
- 5.🌈 Which colour of light is strongest in rgb(14, 186, 32)? (a) green (b) blue (c) red
-
6.🎯 Which CSS selector matches this element?
<h1 class="note" id="top">Hello</h1> (a) #note (b) .top (c) h1 (d) h2 -
7.🖌️ What colour is behind the letters?
li {
background-color: purple;
font-size: 12px;
text-align: right;
color: yellow;
} (a) purple (b) blue (c) yellow - 8.🖌️ Which CSS property centres a heading? (a) background-color (b) color (c) font-size (d) text-align
- 9.🔁 Which word runs code only when something is true? (a) let (b) if (c) for (d) log
- 10.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
- 11.True or false: <img src="cat.png"> goes in index.html. (a) True (b) False
-
12.📋 What number does the browser show next to “Banana”?
<ol start="4">
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
<li>Papaya</li>
</ol> -
13.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png - 14.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <a>
-
15.🎯 Which CSS selector matches this element?
<p class="big" id="logo">Hello</p> (a) #big (b) p (c) .logo (d) h1 - 16.🚀 Which file should this code go in: let score = 0; (a) index.html (b) style.css (c) script.js
-
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) body (c) Easy snacks (d) Space Facts - 18.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
-
19.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + i;
}
console.log(total); - 20.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
21.✍️ How many declarations (property: value pairs) are in this rule?
.note {
width: 300px;
padding: 8px;
} -
22.🔁 How many times does this code print “Welcome”?
for (let i = 3; i < 9; i++) {
console.log("Welcome");
} -
23.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) About us (b) https://example.com (c) contact.html (d) about.html - 24.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 25.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) style.css (c) script.js (d) notes.txt
- 26.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the console (d) in the address bar
-
27.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 4;
console.log(x + y); (a) 10 (b) Error (c) 64 - 28.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) opens web pages for us (d) colours code to help us
- 29.Which of these is a closing tag? (a) </li> (b) <p> (c) <body> (d) <h1>
-
30.⚡ What does this code show?
let name = "Kabir";
console.log("Hello, " + name + "!"); (a) name (b) Hello, name! (c) Hello, Kabir! (d) Kabir - 31.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
- 32.True or false: CSS sets colours and fonts. (a) True (b) False
- 33.True or false: CSS rounds box corners. (a) False (b) True
- 34.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) </small> (d) <small/>
-
35.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Banana</td><td>Papaya</td></tr>
<tr><td>Banana</td><td>Guava</td></tr>
<tr><td>Banana</td><td>Orange</td></tr>
</table> - 36.Which of these is a weak password? (a) Chai$Cup_19x (b) Rain#Drop_42! (c) Mango#Kite29! (d) riya2014
-
37.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) href (b) Play games (c) art.html (d) About us -
38.🔁 What is the LAST number this code prints?
for (let i = 0; i < 17; i = i + 4) {
console.log(i);
} - 39.What does font-weight do? (a) makes the text bold (b) sets the letter colour (c) colours behind the text (d) centres a heading
-
40.🖌️ Where does the text sit on its line?
h2 {
text-align: left;
font-size: 12px;
background-color: black;
color: blue;
} (a) on the left (b) in the middle (c) on the right
Answer key
- iloveyou
- 16
- yellow
- False
- green
- h1
- purple
- text-align
- if
- equal gaps, none at ends
- True
- 5
- dog.jpg
- <a>
- p
- script.js
- Easy snacks
- on the browser tab
- 21
- No
- 2
- 6
- about.html
- <!DOCTYPE html>
- script.js
- in the console
- 64
- opens web pages for us
- </li>
- Hello, Kabir!
- False
- True
- True
- </small>
- 2
- riya2014
- Play games
- 16
- makes the text bold
- on the left
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids