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.True or false: the URL asks for a web page. (a) False (b) True
- 2.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
- 3.📝 Which input type sends the form? (a) submit (b) password (c) number (d) date
-
4.📊 How many rows does this table have?
<table>
<tr><td>Guava</td><td>Orange</td><td>Grapes</td></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Banana</td></tr>
<tr><td>Jamun</td><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Guava</td><td>Litchi</td></tr>
</table> - 5.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
- 6.📝 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
- 7.True or false: <footer> holds copyright notes. (a) False (b) True
- 8.✍️ In color: blue; which part is the value? (a) ; (b) : (c) blue (d) color
-
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) Birthday cake (b) Map of India (c) width (d) map.png -
10.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>Cricket is fun.</p> --> (a) Fun facts (b) Cricket is fun. (c) Hello, world! - 11.🌗 Is light grey on white easy or hard to read? (a) hard to read (b) easy to read
-
12.⚖️ What colour is the text of this element?
<h2 class="star" id="hero">Hi</h2>
CSS:
.star { color: white; }
h2 { color: green; } (a) white (b) blue (c) green (d) orange -
13.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="password">
<input type="text">
<input type="email">
<input type="number">
<input type="submit" value="Send">
</form> -
14.⚖️ What colour is the text of this element?
<h1 class="red" id="end">Hi</h1>
CSS:
#end { color: yellow; }
#end { color: black; } (a) black (b) blue (c) yellow (d) red - 15.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
- 16.True or false: a web server opens web pages for us. (a) False (b) True
- 17.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) bright green (c) blue (d) magenta
- 18.True or false: <a href="a.html">Go</a> goes in style.css. (a) True (b) False
- 19.🚀 You change your code. What should you do to see the change? (a) delete the file (b) save and refresh (c) switch off the PC (d) rename the folder
- 20.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) close it, tell an adult (b) click it twice (c) share it with friends (d) type the password
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) index.html (c) My Hobbies (d) Planets -
22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 210px;
padding: 15px;
border: 2px solid black;
margin: 10px;
} - 23.🚀 Which file should this code go in: alert(score); (a) script.js (b) style.css (c) index.html
-
24.⚡ What number does this code print?
let score = 19;
score = score + 17;
score = score - 16;
console.log(score); - 25.🎨 Which tag connects an outside CSS file? (a) <link> (b) <img> (c) <css> (d) <a>
- 26.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 27.True or false: <ul> goes inside ul or ol. (a) False (b) True
-
28.⚖️ What colour is the text of this element?
<h1 class="star" id="top">Hi</h1>
CSS:
.star { color: blue; }
.star { color: red; } (a) yellow (b) black (c) red (d) blue -
29.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) index.html (c) Cricket Club (d) My drawings -
30.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<h2>Good morning!</h2> -
31.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 330px;
justify-content: flex-start;
}
Inside are 3 boxes, each 100px wide (no margins). -
32.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + 3;
}
console.log(total); - 33.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
-
34.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 200px;
justify-content: center;
}
Inside are 2 boxes, each 40px wide (no margins). -
35.⚡ What number does this code print?
let books = 8;
books = books + 2;
books = books - 6;
console.log(books); -
36.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/art/gallery.html (a) No (b) Yes - 37.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
-
38.✍️ What value is given to text-align in this rule?
.note {
padding: 8px;
font-style: italic;
text-align: center;
width: 300px;
} (a) text-align (b) 10px (c) yellow (d) center - 39.🎯 Which sign starts a class selector? (a) & (b) . (c) @ (d) #
- 40.True or false: in <img>, alt sets how wide it is. (a) True (b) False
Answer key
- False
- an element selector
- submit
- 4
- <h1>
- as one space
- True
- blue
- Map of India
- Cricket is fun.
- hard to read
- white
- 6
- black
- 1
- False
- blue
- False
- save and refresh
- close it, tell an adult
- My Hobbies
- 244
- script.js
- 20
- <link>
- 255
- False
- red
- Cricket Club
- 2
- 30
- 24
- alt
- 60
- 4
- Yes
- a web server
- center
- .
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids