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 an opening tag? (a) </p> (b) </h1> (c) <b> (d) </li>
- 2.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the later one (c) the first one (d) neither
- 3.📦 In the box model, which part is space inside the border? (a) margin (b) padding (c) border (d) content
- 4.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
-
5.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Litchi</td><td>Banana</td></tr>
<tr><td>Guava</td><td>Litchi</td></tr>
</table> - 6.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
- 7.🧩 Which language sets colours and fonts? (a) HTML (b) CSS (c) JavaScript
-
8.🖌️ What colour are the letters?
h1 {
color: blue;
background-color: green;
font-size: 16px;
text-align: center;
} (a) green (b) blue (c) black -
9.⚖️ What colour is the text of this element?
<h2 class="menu" id="intro">Hi</h2>
CSS:
h2 { color: black; }
h2 { color: purple; } (a) yellow (b) purple (c) orange (d) black - 10.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<main>”? (a) <header> (b) <main>
-
11.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 8px;
}
} - 12.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser shows it (b) the server sends files (c) the browser asks it (d) DNS finds the server
-
13.🖌️ What colour are the letters?
h1 {
color: purple;
text-align: left;
font-size: 40px;
background-color: green;
} (a) purple (b) green (c) black - 14.True or false: <ul> is an empty tag. (a) False (b) True
-
15.⚡ What does this code show?
let name = "Aman";
console.log("Well done, " + name + "!"); (a) Aman (b) name (c) Well done, name! (d) Well done, Aman! - 16.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 17.True or false: to check for https first is safe. (a) True (b) False
- 18.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) yellow (d) red
- 19.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
-
20.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) href (b) About us (c) games.html (d) Play games -
21.🔁 How many numbers does this code print?
for (let i = 0; i < 19; i = i + 4) {
console.log(i);
} -
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) All about me (b) index.html (c) Try this poha. (d) My Hobbies - 23.True or false: <header> holds copyright notes. (a) True (b) False
-
24.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 150px;
padding: 15px;
border: 3px solid black;
margin: 10px;
} -
25.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 210px;
justify-content: flex-start;
}
Inside are 3 boxes, each 60px wide (no margins). -
26.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>The red kite</h3>
<p>The red kite</p>
<p>Good morning!</p>
<p>The red kite</p> - 27.Which of these is true of a web server? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows pages from the web
- 28.🛡️ Online: is it safe to keep passwords secret? (a) safe (b) not safe
- 29.True or false: a web server sends pages over the net. (a) False (b) True
- 30.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <html> (c) </body> (d) </html>
- 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
- 32.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 33.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
-
34.🔗 Where does this link open?
<a href="https://example.com" target="_blank">About us</a> (a) in the same tab (b) in a new tab - 35.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 36.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
- 37.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 38.True or false: li is an element selector. (a) False (b) True
-
39.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) news.html (c) Play games (d) games.html - 40.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
Answer key
- <b>
- the later one
- padding
- an id selector
- 4
- script.js
- CSS
- blue
- purple
- <header>
- 8
- DNS finds the server
- purple
- False
- Well done, Aman!
- <ol>
- True
- blue
- <li>
- Play games
- 5
- My Hobbies
- False
- 206
- 30
- 2
- stores a website’s files
- safe
- True
- </html>
- <h1>
- a web browser
- <h3>
- in a new tab
- No
- </h2>
- in the body
- True
- news.html
- structure
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids