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.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Jamun</td><td>Orange</td><td>Jamun</td></tr>
<tr><td>Jamun</td><td>Grapes</td><td>Papaya</td></tr>
</table> - 2.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) write the HTML (c) test in a browser (d) add CSS styles
- 3.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <header> (b) <main>
- 4.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
- 5.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) shows line numbers
- 6.True or false: HTML makes a form box. (a) True (b) False
- 7.Which of these is a strong password? (a) abcd1234 (b) iloveyou (c) password (d) Kite_Fl1es@Dawn
-
8.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 250px;
padding: 10px;
border: 1px solid black;
margin: 20px;
} - 9.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
-
10.🔁 What does this code print?
let age = 39;
if (age >= 41) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 11.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
-
12.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> (a) My pets (b) Cricket is fun. (c) Good morning! -
13.⚖️ What colour is the text of this element?
<p class="red" id="intro">Hi</p>
CSS:
p { color: orange; }
#intro { color: red; } (a) purple (b) blue (c) orange (d) red - 14.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <p> (d) <link>
- 15.Which of these has a closing tag? (a) <br> (b) <img> (c) <input> (d) <b>
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Space Facts (b) Thanks for visiting. (c) Match report (d) index.html -
17.⚖️ What colour is the text of this element?
<p class="big" id="logo">Hi</p>
CSS:
#logo { color: blue; }
p { color: yellow; }
.big { color: green; } (a) green (b) yellow (c) blue (d) white - 18.⚡ Which JavaScript word shows a pop-up box? (a) if (b) alert() (c) console.log() (d) let
-
19.📱 The screen is 1366px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 10px;
}
} (a) Yes (b) No - 20.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
- 21.True or false: the border is space outside the border. (a) True (b) False
- 22.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
- 23.🔢 In a basic web page file, which comes first: “</html>” or “<body>”? (a) <body> (b) </html>
-
24.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<h2>Hello, world!</h2>
<p>I love mangoes. (a) </h1> (b) </h2> (c) </p> (d) </i> - 25.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
- 26.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
-
27.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 170px;
justify-content: flex-start;
}
Inside are 3 boxes, each 50px wide (no margins). -
28.⚖️ What colour is the text of this element?
<h2 class="star" id="intro">Hi</h2>
CSS:
#intro { color: purple; }
#intro { color: white; } (a) white (b) yellow (c) red (d) purple -
29.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 30.Which of these has a closing tag? (a) <input> (b) <br> (c) <p> (d) <hr>
- 31.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
-
32.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); - 33.True or false: <hr> is an empty tag. (a) True (b) False
- 34.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
- 35.What is <input type="number"> for? (a) lets you pick only one (b) is for an email address (c) takes only numbers (d) hides what you type
-
36.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 10px;
}
} (a) Yes (b) No - 37.True or false: in <img>, alt sets how wide it is. (a) True (b) False
- 38.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
39.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) games.html (b) Take the quiz (c) contact.html (d) about.html -
40.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Banana</li>
<li>Guava</li>
</ol>
Answer key
- 3
- plan what to show
- <header>
- src
- shows line numbers
- True
- Kite_Fl1es@Dawn
- 312
- <ol>
- child
- href
- My pets
- red
- <a>
- <b>
- Space Facts
- blue
- alert()
- No
- an id selector
- False
- a plain text editor
- <body>
- </p>
- 6
- a web server
- 20
- white
- bullets
- <p>
- to leave notes
- 36
- True
- <h6>
- takes only numbers
- Yes
- False
- in the head
- games.html
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids