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 is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Welcome! (c) Art Gallery (d) Mars is red. -
2.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 240px;
justify-content: space-between;
}
Inside are 2 boxes, each 80px wide (no margins). - 3.True or false: <h1> goes in the body. (a) False (b) True
- 4.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the br tag (d) the title tag
- 5.True or false: the border is the text or picture. (a) True (b) False
- 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
7.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Planets (c) body (d) Cricket Club - 8.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
-
9.⚡ What does this code print? (Look at the quotes!)
let x = "1";
let y = 6;
console.log(x + y); (a) 16 (b) Error (c) 7 - 10.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <js src="script.js"> (d) <link script.js>
-
11.🌍 What is the domain name in this URL?
https://www.example.com/about.html (a) kids.example.org (b) /about.html (c) www.example.com (d) https - 12.🎯 Can many elements share the same class? (a) Yes (b) No
-
13.🔁 What is the LAST number this code prints?
for (let i = 0; i < 20; i = i + 2) {
console.log(i);
} - 14.📊 In a table, which tag is a row? (a) <td> (b) <tb> (c) <tr> (d) <th>
-
15.🌍 What is the domain name in this URL?
https://learn.example.com/index.html (a) /index.html (b) learn.example.com (c) https (d) www.example.com - 16.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) red (d) black
- 17.🖌️ Which CSS property colours behind the text? (a) color (b) font-family (c) background-color (d) text-align
- 18.True or false: <caption> gives the table a title. (a) False (b) True
- 19.True or false: margin is the gap to other boxes. (a) True (b) False
-
20.✍️ What value is given to text-align in this rule?
h2 {
border: 2px solid;
font-style: italic;
text-align: center;
} (a) center (b) text-align (c) yellow (d) 10px - 21.True or false: JavaScript makes a link. (a) True (b) False
- 22.Which of these goes in the head? (a) <a> (b) <h1> (c) <table> (d) <link rel="stylesheet">
- 23.Which of these is true of <article>? (a) holds copyright notes (b) is the page’s key part (c) holds a news story (d) holds extra side notes
- 24.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) doubles i (d) adds 1 to i
-
25.🔁 What does this code print?
let temp = 21;
if (temp >= 37) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 26.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.✍️ How does a CSS comment start? (a) # (b) <!-- (c) /* (d) //
- 28.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <nav> (c) <main> (d) <footer>
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) body (c) Welcome! (d) Here is my best one. - 30.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
- 31.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) ( (d) [
- 32.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>
-
33.🖌️ Where does the text sit on its line?
h2 {
color: green;
font-size: 24px;
text-align: left;
background-color: purple;
} (a) on the right (b) in the middle (c) on the left -
34.⚡ What number does this code print?
let apples = 26;
apples = apples + 6;
apples = apples - 13;
console.log(apples); - 35.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <hr> (d) <title>
- 36.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
- 37.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <title> (d) <meta charset="utf-8">
- 38.True or false: to tell a trusted adult is not safe. (a) False (b) True
-
39.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) games.html (b) about.html (c) quiz.html (d) About us - 40.Which colour pair is easy to read? (a) light grey on white (b) yellow on black (c) red on green (d) yellow on white
Answer key
- Welcome!
- 80
- True
- the viewport meta tag
- False
- in the body
- Planets
- on the browser tab
- 16
- <script src="script.js">
- www.example.com
- Yes
- 18
- <tr>
- learn.example.com
- red
- background-color
- True
- True
- center
- False
- <link rel="stylesheet">
- holds a news story
- adds 1 to i
- Cool
- has a closing tag
- /*
- <footer>
- Welcome!
- 6
- <
- <!DOCTYPE html>
- on the left
- 19
- <label>
- text stands out clearly
- <p>
- False
- quiz.html
- yellow on black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids