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 <main>? (a) sits at the very top (b) holds the menu of links (c) helps you move around (d) holds the main content
- 2.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
-
3.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 600px) {
p {
font-size: 14px;
}
} -
4.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 5.True or false: to log out on shared PCs is safe. (a) False (b) True
- 6.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
-
7.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 18px;
}
} - 8.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
- 9.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
-
10.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 20px;
}
} (a) Yes (b) No - 11.True or false: to use a strong password is not safe. (a) False (b) True
- 12.🎯 What kind of selector is #logo? (a) an element selector (b) a class selector (c) an id selector
-
13.📊 How many rows does this table have?
<table>
<tr><td>Jamun</td><td>Litchi</td><td>Banana</td></tr>
<tr><td>Litchi</td><td>Mango</td><td>Guava</td></tr>
</table> - 14.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) weak (b) strong
- 15.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is fast (c) the data is scrambled (d) the site is free
-
16.📄 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>We won by 5 runs.</p>
</body>
</html> (a) My Hobbies (b) All about me (c) We won by 5 runs. (d) index.html -
17.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) About us (b) Contact us (c) href (d) games.html -
18.✍️ Which property is set to 10px in this rule?
p {
font-style: italic;
margin: 10px;
} (a) font-weight (b) margin (c) 10px (d) padding -
19.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 240px;
justify-content: center;
}
Inside are 2 boxes, each 40px wide (no margins). - 20.Which of these is an empty tag? (a) <b> (b) <input> (c) <h1> (d) <ul>
- 21.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 22.🌗 Is yellow on black easy or hard to read? (a) easy to read (b) hard to read
-
23.🖌️ What colour are the letters?
p {
font-size: 40px;
background-color: black;
text-align: left;
color: red;
} (a) black (b) red (c) purple -
24.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Rain today</p> --> -
25.🔁 How many numbers does this code print?
for (let i = 0; i < 20; i = i + 4) {
console.log(i);
} - 26.🔢 To build and share your first web page, which comes FIRST? (a) add CSS styles (b) plan what to show (c) publish it online (d) write the HTML
- 27.🔍 Which is the odd one out? (a) makes a form box (b) makes headings and lists (c) gives the page structure (d) adds space around boxes
- 28.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <caption> (d) <tr>
- 29.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 30.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
- 31.✍️ CSS declarations go inside which brackets? (a) [ ] (b) < > (c) ( ) (d) { }
-
32.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 600px) {
p {
font-size: 16px;
}
} (a) No (b) Yes -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A red kite (b) A tiger asleep (c) width (d) tiger.jpg -
34.🖌️ Where does the text sit on its line?
li {
font-size: 20px;
text-align: right;
color: green;
background-color: white;
} (a) in the middle (b) on the right (c) on the left - 35.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
- 36.🔁 Which word runs code only when something is true? (a) for (b) let (c) if (d) log
- 37.🎯 What kind of selector is #end? (a) an id selector (b) an element selector (c) a class selector
- 38.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) turns HTML into a page (d) hosts websites online
- 39.Which of these is the border? (a) a solid or dotted edge (b) space outside the border (c) the text or picture (d) space inside the border
- 40.Which of these does HTML do? (a) adds space around boxes (b) makes a link (c) shows a pop-up message (d) counts down a timer
Answer key
- holds the main content
- alt
- 16
- in a new tab
- True
- an element selector
- 20
- hard to read
- screen-reader users
- No
- False
- an id selector
- 2
- strong
- the data is scrambled
- My Hobbies
- About us
- margin
- 80
- <input>
- a web browser
- easy to read
- red
- 1
- 5
- plan what to show
- adds space around boxes
- <caption>
- <ul>
- True
- { }
- Yes
- A tiger asleep
- on the right
- href
- if
- an id selector
- hosts websites online
- a solid or dotted edge
- makes a link
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids