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.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
-
2.🔁 How many times does this code print “Hello”?
for (let i = 3; i < 12; i++) {
console.log("Hello");
} - 3.🌍 What do we call the computer that stores a website? (a) a mouse (b) a server (c) a keyboard (d) a printer
-
4.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>My pets</p> --> (a) Good morning! (b) Rain today (c) Our school trip (d) My pets - 5.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) height (d) width
- 6.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
- 7.🎯 Which element does the selector #top style? (a) <h2 class="top"> (b) <h2 id="intro"> (c) <li class="box"> (d) <h2 id="top">
- 8.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 9.♿ Who uses a screen reader? (a) only robots (b) only teachers (c) people who are blind (d) only coders
-
10.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) contact.html (c) href (d) Play games - 11.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
- 12.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it loads faster (d) it makes text red
-
13.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/maths/tables.html (a) Yes (b) No - 14.🧭 How many <main> parts should a page have? (a) one (b) three (c) ten (d) none
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg - 16.Which of these is true of a web browser? (a) hosts websites online (b) shows line numbers (c) has an address bar (d) saves our .html files
- 17.Which of these does CSS do? (a) shows a pop-up message (b) reacts to a button click (c) changes the text size (d) gives the page structure
- 18.📊 In a table, which tag is a row? (a) <tb> (b) <th> (c) <td> (d) <tr>
- 19.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.Which of these is true of <nav>? (a) helps you move around (b) holds the logo and title (c) holds a news story (d) holds the main content
-
21.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>Rain today</p> --> (a) Fun facts (b) Cricket is fun. (c) Rain today -
22.♿ Is this heading order correct (no level skipped)?
<h1> → <h3> → <h4> → <h4> (a) No (b) Yes - 23.What does justify-content: space-between do? (a) packs boxes at the end (b) packs boxes at the start (c) puts boxes in the middle (d) equal gaps, none at ends
- 24.🖌️ Which CSS property sets the letter colour? (a) background-color (b) font-size (c) text-align (d) color
-
25.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/about.html (a) No (b) Yes - 26.True or false: HTML puts a picture on a page. (a) True (b) False
- 27.True or false: a web server saves our .html files. (a) True (b) False
-
28.🔁 How many times does this code print “Well done”?
for (let i = 3; i <= 12; i++) {
console.log("Well done");
} - 29.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) . (d) ;
-
30.🔁 What does this code print?
let age = 42;
if (age >= 26) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen -
31.🖌️ What colour are the letters?
h2 {
font-size: 36px;
text-align: right;
color: orange;
background-color: black;
} (a) orange (b) white (c) black - 32.True or false: JavaScript sets colours and fonts. (a) False (b) True
-
33.⚡ What does this code show?
let name = "Kabir";
alert("Well done, " + name + "!"); (a) Well done, name! (b) Kabir (c) name (d) Well done, Kabir! - 34.True or false: <table> makes one table row. (a) True (b) False
-
35.🎯 Which CSS selector matches this element?
<h2 class="red" id="logo">Hello</h2> (a) #logo (b) li (c) #red (d) .logo -
36.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 220px;
justify-content: flex-start;
}
Inside are 4 boxes, each 50px wide (no margins). - 37.Which of these is the content? (a) the line round the box (b) the text or picture (c) a solid or dotted edge (d) the gap round content
-
38.✍️ What value is given to font-weight in this rule?
h2 {
width: 300px;
font-weight: bold;
background-color: yellow;
} (a) font-weight (b) bold (c) 2px solid (d) 300px - 39.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
- 40.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
Answer key
- on the browser tab
- 9
- a server
- My pets
- width
- <h6>
- <h2 id="top">
- in the head
- people who are blind
- Play games
- the later one
- it tells its meaning
- Yes
- one
- A tiger asleep
- has an address bar
- changes the text size
- <tr>
- an empty tag
- helps you move around
- Rain today
- No
- equal gaps, none at ends
- color
- Yes
- True
- False
- 10
- ;
- teen
- orange
- False
- Well done, Kabir!
- False
- #logo
- 20
- the text or picture
- bold
- src
- -->
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids