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 true of <aside>? (a) holds the logo and title (b) holds a side box of tips (c) helps you move around (d) holds the main content
- 2.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
-
3.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>Hello, world!</h2>
<h2>My best friend</h2> - 4.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
- 5.True or false: <p>Hello!</p> goes in index.html. (a) False (b) True
- 6.🔢 To build and share your first web page, which comes LAST? (a) test in a browser (b) write the HTML (c) publish it online (d) add CSS styles
- 7.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) takes 1 from i (d) prints i
- 8.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
- 9.🖌️ Which CSS property makes letters bigger? (a) font-family (b) text-align (c) background-color (d) font-size
- 10.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
- 11.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) share your OTP (d) use a strong password
- 12.🔍 Which is the odd one out? (a) changes the page live (b) makes headings and lists (c) reacts to a button click (d) shows a pop-up message
-
13.🌍 What is the domain name in this URL?
http://www.example.com/index.html (a) http (b) /index.html (c) www.example.com (d) kids.example.org - 14.True or false: alert("Hi"); goes in script.js. (a) True (b) False
-
15.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 768px) {
p {
font-size: 26px;
}
} (a) Yes (b) No -
16.🔁 How many times does this code print “Hello”?
for (let i = 2; i <= 10; i++) {
console.log("Hello");
} - 17.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) you type the URL (c) the browser asks it (d) the server sends files
- 18.🖌️ Which CSS property centres a heading? (a) background-color (b) font-family (c) font-weight (d) text-align
- 19.Which of these is a strong password? (a) S0lar!Pen#8 (b) 123456 (c) 111111 (d) password
-
20.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 16px;
}
} -
21.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Mango</td><td>Mango</td></tr>
</table> -
22.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Kabaddi
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Hockey
<input type="checkbox" name="sport"> Football
</form> -
23.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) About us (b) https://example.com (c) maths.html (d) art.html - 24.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) width (d) src
-
25.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<p>Hello, world!</p>
<p>Our school trip</p>
<h4>Fun facts</h4> - 26.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
- 27.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
- 28.⚡ Which JavaScript word makes a new variable? (a) alert() (b) console.log() (c) if (d) let
- 29.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
-
30.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 1024px) {
p {
font-size: 14px;
}
} - 31.♿ Which link text is clearest? (a) click here (b) Read the fruit facts (c) here (d) link
-
32.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="200"> - 33.📊 Which tag makes a heading cell? (a) <caption> (b) <th> (c) <tr> (d) <td>
-
34.🔗 Where does this link open?
<a href="maths.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 35.🔐 Is password a strong or a weak password? (a) weak (b) strong
-
36.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 480px) {
p {
font-size: 18px;
}
} - 37.🎯 What kind of selector is #end? (a) a class selector (b) an id selector (c) an element selector
-
38.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 4 boxes, each 40px wide (no margins). - 39.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) fits every screen (d) never changes
- 40.🚀 Which file should this code go in: console.log(5 + 2); (a) index.html (b) style.css (c) script.js
Answer key
- holds a side box of tips
- an id selector
- 2
- No
- True
- publish it online
- adds 1 to i
- #
- font-size
- the later one
- share your OTP
- makes headings and lists
- www.example.com
- True
- No
- 9
- you type the URL
- text-align
- S0lar!Pen#8
- 12
- 4
- 4
- https://example.com
- height
- 2
- a paragraph
- to describe the image
- let
- <h5>
- 16
- Read the fruit facts
- 200
- <th>
- in a new tab
- weak
- 24
- an id selector
- 40
- fits every screen
- script.js
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids