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 attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
-
2.🌍 What is the protocol in this URL?
http://school.example.in/art/gallery.html (a) /art/gallery.html (b) school.example.in (c) https (d) http - 3.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
-
4.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) Thanks for visiting. (c) body (d) Planets -
5.🖌️ What colour are the letters?
p {
color: yellow;
font-size: 20px;
background-color: white;
text-align: left;
} (a) yellow (b) white (c) black - 6.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <ol> (d) <input>
- 7.Which of these is a weak password? (a) Blue@Tiger_74 (b) qwerty (c) Rain#Drop_42! (d) Mango#Kite29!
-
8.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<h2>Fun facts</h2>
<h2>I love mangoes.</h2>
<p>The red kite</p>
<p>Cricket is fun.</p> - 9.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
- 10.True or false: <p> has a closing tag. (a) False (b) True
- 11.Which of these goes in the head? (a) <a> (b) <p> (c) <table> (d) <title>
- 12.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
-
13.🌍 What is the protocol in this URL?
https://school.example.in/news/today.html (a) http (b) https (c) /news/today.html (d) school.example.in - 14.🔢 To build and share your first web page, which comes FIRST? (a) test in a browser (b) publish it online (c) plan what to show (d) add CSS styles
-
15.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 14px;
}
} (a) No (b) Yes -
16.⚖️ What colour is the text of this element?
<p class="star" id="intro">Hi</p>
CSS:
#intro { color: black; }
#intro { color: blue; } (a) blue (b) black (c) purple (d) green -
17.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} - 18.True or false: <article> holds one blog post. (a) False (b) True
- 19.🧩 Which language adds space around boxes? (a) HTML (b) CSS (c) JavaScript
- 20.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
- 21.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
- 22.True or false: a web browser opens web pages for us. (a) False (b) True
- 23.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="50"> - 25.⚡ Which JavaScript word writes in the console? (a) alert() (b) console.log() (c) let (d) for
- 26.🎯 What kind of selector is .card? (a) an id selector (b) a class selector (c) an element selector
-
27.⚖️ What colour is the text of this element?
<p class="big" id="intro">Hi</p>
CSS:
p { color: orange; }
#intro { color: blue; } (a) purple (b) yellow (c) blue (d) orange - 28.What does color do? (a) makes the text bold (b) centres a heading (c) sets the letter colour (d) picks the font style
- 29.True or false: HTML adds space around boxes. (a) False (b) True
- 30.📱 Responsive design means a page ___. (a) fits every screen (b) never changes (c) is only for laptops (d) has no pictures
-
31.✍️ What is the selector in this CSS rule?
h1 {
font-weight: bold;
width: 300px;
} (a) font-weight (b) 300px (c) h1 (d) p - 32.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
- 33.True or false: a web browser shows line numbers. (a) True (b) False
-
34.📝 How many <input> tags are in this form?
<form>
<input type="number">
<input type="email">
<input type="date">
<input type="submit" value="Send">
</form> -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) Our school bus (b) width (c) moon.png (d) The full moon -
36.🖌️ How big is the text, in px?
li {
background-color: white;
color: yellow;
text-align: left;
font-size: 36px;
} -
37.🔍 One closing tag is missing. Which one?
<small>My best friend
<h2>I love mangoes.</h2>
<b>Cricket is fun.</b> (a) </h2> (b) </small> (c) </b> (d) </u> -
38.🔁 What does this code print?
let temp = 9;
if (temp > 12) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 39.🖌️ Which CSS property sets the letter colour? (a) font-size (b) font-family (c) background-color (d) color
- 40.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
Answer key
- src
- http
- an element selector
- Planets
- yellow
- <form>
- qwerty
- 4
- 226
- True
- <title>
- text stands out clearly
- https
- plan what to show
- No
- blue
- 14
- True
- CSS
- an id selector
- <a>
- True
- </small>
- 50
- console.log()
- a class selector
- blue
- sets the letter colour
- False
- fits every screen
- h1
- <nav>
- False
- 4
- The full moon
- 36
- </small>
- Cool
- color
- the screen width
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids