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 path in this URL?
http://learn.example.com/games/chess.html (a) /about.html (b) /games/chess.html (c) http (d) learn.example.com - 2.🔍 Which is the odd one out? (a) adds space around boxes (b) puts a picture on a page (c) makes headings and lists (d) makes a link
- 3.🔍 Which is the odd one out? (a) counts down a timer (b) gives the page structure (c) puts a picture on a page (d) makes a form box
- 4.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
-
5.✍️ What is the selector in this CSS rule?
li {
padding: 8px;
background-color: yellow;
} (a) body (b) yellow (c) padding (d) li -
6.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 7.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
- 8.Which of these is a closing tag? (a) <p> (b) <li> (c) <title> (d) </b>
- 9.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) index.html (c) script.js
-
10.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + 7;
}
console.log(total); -
11.🔁 What does this code print?
let age = 23;
if (age >= 15) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 12.Which of these is an opening tag? (a) </title> (b) </li> (c) <body> (d) </h1>
- 13.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or narrower (c) 600px or wider (d) turned off
- 14.💪 Which flexbox property spaces boxes along a row? (a) justify-content (b) flex-direction (c) display: flex (d) align-items
- 15.Which of these is true of a web browser? (a) answers page requests (b) shows line numbers (c) opens web pages for us (d) saves our .html files
- 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
-
17.⚡ What number does this code print?
let score = 5;
score = score + 17;
score = score - 15;
console.log(score); - 18.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) type a password on http (d) use a strong password
- 19.📄 Can HTML on its own make a form? (a) No (b) Yes
- 20.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #ff00ff
- 21.What does justify-content: flex-start do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
- 22.Which of these is padding? (a) space outside the border (b) a solid or dotted edge (c) the text or picture (d) the gap round content
- 23.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
-
24.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<small>Rain today
<u>I love mangoes.</u> (a) </h3> (b) </i> (c) </u> (d) </small> -
25.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 360px;
justify-content: center;
}
Inside are 3 boxes, each 80px wide (no margins). -
26.🖌️ How big is the text, in px?
li {
color: orange;
text-align: right;
font-size: 28px;
background-color: white;
} - 27.True or false: HTML on its own cannot pick a random number. (a) True (b) False
- 28.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 29.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h6> (b) <h2> (c) <h3> (d) <h4>
-
30.📋 Does this list show bullets or numbers?
<ol>
<li>Litchi</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 31.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) ; (d) .
-
32.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 90px;
padding: 20px;
border: 1px solid black;
margin: 5px;
} -
33.🌍 What is the domain name in this URL?
https://school.example.in/index.html (a) www.example.net (b) https (c) /index.html (d) school.example.in -
34.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 280px;
justify-content: center;
}
Inside are 2 boxes, each 60px wide (no margins). - 35.What does background-color do? (a) colours behind the text (b) centres a heading (c) picks the font style (d) makes the text bold
- 36.Which of these is safe to do online? (a) meet an online stranger (b) put secrets in comments (c) click prize links (d) use a strong password
- 37.🔐 Is password a strong or a weak password? (a) strong (b) weak
-
38.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="50"> (a) cake.jpg (b) dog.jpg (c) map.png (d) Map of India -
39.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Rain today</h2>
<h2>Rain today</h2> -
40.🖌️ How big is the text, in px?
p {
text-align: center;
font-size: 28px;
background-color: black;
color: orange;
}
Answer key
- /games/chess.html
- adds space around boxes
- counts down a timer
- script.js
- li
- bullets
- a web server
- </b>
- script.js
- 56
- teen
- <body>
- 600px or narrower
- justify-content
- opens web pages for us
- <a href="about.html">
- 7
- type a password on http
- Yes
- #ff0000
- packs boxes at the start
- the gap round content
- red
- </small>
- 60
- 28
- True
- a closing tag
- <h3>
- numbers
- ;
- 142
- school.example.in
- 80
- colours behind the text
- use a strong password
- weak
- map.png
- 3
- 28
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids