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 number does this code print?
let total = 0;
for (let i = 1; i <= 7; i++) {
total = total + 7;
}
console.log(total); -
2.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) games.html (b) Play games (c) quiz.html (d) news.html -
3.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) Play games (b) art.html (c) maths.html (d) news.html - 4.True or false: <input type="number"> takes only numbers. (a) True (b) False
-
5.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 28px;
}
} - 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
- 7.True or false: <input type="number"> lets you tick many. (a) True (b) False
- 8.🧭 Is <aside> semantic or not semantic? (a) semantic (b) not semantic
-
9.⚖️ What colour is the text of this element?
<h2 class="box" id="top">Hi</h2>
CSS:
#top { color: blue; }
#top { color: orange; } (a) black (b) orange (c) blue (d) red - 10.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) script.js (c) notes.txt (d) style.css
- 11.Which of these is a strong password? (a) S0lar!Pen#8 (b) 111111 (c) riya2014 (d) 123456
-
12.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Hello, world! (b) The red kite (c) Good morning! - 13.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 14.True or false: <li> shows bullet points. (a) False (b) True
-
15.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> --> -
16.⚖️ What colour is the text of this element?
<h1 class="big" id="hero">Hi</h1>
CSS:
.big { color: orange; }
h1 { color: green; } (a) orange (b) purple (c) black (d) green - 17.📝 Which tag makes a drop-down list? (a) <ul> (b) <select> (c) <ol> (d) <li>
- 18.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) height (d) src
-
19.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) maths.html (b) art.html (c) Visit the site (d) https://example.com -
20.🔗 Which address opens when you click this link?
<a href="art.html">Play games</a> (a) art.html (b) Play games (c) quiz.html (d) news.html - 21.Which of these is margin? (a) the gap round content (b) space outside the border (c) a solid or dotted edge (d) space inside the border
- 22.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <body> (b) <head>
- 23.🎯 Which sign starts a class selector? (a) @ (b) # (c) . (d) &
- 24.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the br tag (c) the viewport meta tag (d) the title tag
- 25.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
-
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) body (b) Cricket Club (c) Try this poha. (d) Match report - 27.💪 Which flexbox property lines boxes up across? (a) justify-content (b) gap (c) align-items (d) flex-direction
- 28.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
- 29.Which of these is an opening tag? (a) </b> (b) <h1> (c) </h1> (d) </p>
-
30.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) about.html (b) contact.html (c) games.html (d) About us - 31.True or false: <tr> holds the whole table. (a) True (b) False
-
32.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!
line 2: <h3>Hello, world!</h3>
line 3: <b>My pets</b> (a) line 3 (b) line 2 (c) line 1 -
33.🔍 One closing tag is missing. Which one?
<h3>I love mangoes.
<strong>My pets</strong>
<p>Cricket is fun.</p> (a) </strong> (b) </p> (c) </u> (d) </h3> -
34.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Good morning!</p>
<h2>Cricket is fun.</h2> - 35.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h3>
- 36.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
- 37.True or false: HTML reacts to a button click. (a) True (b) False
- 38.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
- 39.📱 What does a media query check? (a) the time of day (b) the battery level (c) the screen width (d) the page title
- 40.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) magenta (d) black
Answer key
- 49
- news.html
- maths.html
- True
- 28
- alt
- False
- semantic
- orange
- script.js
- S0lar!Pen#8
- The red kite
- width
- False
- 2
- orange
- <select>
- alt
- https://example.com
- art.html
- space outside the border
- <head>
- .
- the viewport meta tag
- No
- Match report
- align-items
- src
- <h1>
- games.html
- False
- line 1
- </h3>
- 2
- <h2>
- when if is false
- False
- semantic
- the screen width
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids