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 wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 70px;
padding: 30px;
border: 2px solid black;
margin: 5px;
} - 2.🔍 Which is the odd one out? (a) hosts websites online (b) is where we type code (c) colours code to help us (d) saves our .html files
- 3.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
-
4.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 600px) {
p {
font-size: 14px;
}
} (a) No (b) Yes - 5.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
-
6.📊 How many cells are in each row?
<table>
<tr><td>Mango</td><td>Grapes</td><td>Grapes</td><td>Litchi</td></tr>
<tr><td>Grapes</td><td>Papaya</td><td>Guava</td><td>Jamun</td></tr>
<tr><td>Banana</td><td>Banana</td><td>Jamun</td><td>Mango</td></tr>
</table> - 7.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
- 8.Which of these is padding? (a) the gap round content (b) a solid or dotted edge (c) the text or picture (d) space outside the border
- 9.Which of these is an empty tag? (a) <h1> (b) <li> (c) <p> (d) <img>
- 10.🖌️ Which CSS property sets the letter colour? (a) text-align (b) font-size (c) background-color (d) color
- 11.True or false: “use big enough text” helps everyone use the page. (a) True (b) False
-
12.🔗 Where does this link open?
<a href="news.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 13.True or false: <a> goes in the head. (a) False (b) True
-
14.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<p>Fun facts</p> -
15.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 160px;
padding: 25px;
border: 2px solid black;
margin: 0px;
} -
16.✍️ Which property is set to 10px in this rule?
body {
margin: 10px;
text-align: center;
font-weight: bold;
} (a) font-weight (b) 10px (c) margin (d) padding - 17.⚡ What does alert() show? (a) a table (b) a new tab (c) a pop-up box (d) a picture
- 18.True or false: margin is the gap round content. (a) True (b) False
- 19.Which of these is a closing tag? (a) <body> (b) <title> (c) </b> (d) <li>
- 20.🔐 Is password a strong or a weak password? (a) weak (b) strong
- 21.⚡ Which JavaScript word repeats code? (a) console.log() (b) alert() (c) for (d) if
- 22.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 23.Which of these is an opening tag? (a) <body> (b) </h1> (c) </body> (d) </b>
-
24.🔁 How many times does this code print “Hello”?
for (let i = 1; i < 10; i++) {
console.log("Hello");
} - 25.🧩 Which language counts down a timer? (a) HTML (b) JavaScript (c) CSS
- 26.🌈 Which colour is #ff0000? (a) cyan (b) red (c) yellow (d) black
- 27.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 28.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
-
29.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 6px;
}
} -
30.⚖️ What colour is the text of this element?
<h2 class="box" id="logo">Hi</h2>
CSS:
h2 { color: green; }
#logo { color: purple; }
.box { color: white; } (a) purple (b) white (c) green (d) red -
31.🌍 What is the protocol in this URL?
http://kids.example.org/maths/tables.html (a) http (b) https (c) /maths/tables.html (d) kids.example.org - 32.Which of these is a strong password? (a) qwerty (b) Blue@Tiger_74 (c) abcd1234 (d) 111111
-
33.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.com/about.html (a) No (b) Yes - 34.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
-
35.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Hockey
<input type="checkbox" name="sport"> Chess
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Kabaddi
</form> - 36.Which of these is a weak password? (a) riya2014 (b) Chai$Cup_19x (c) Rain#Drop_42! (d) Blue@Tiger_74
-
37.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 280px;
justify-content: space-between;
}
Inside are 4 boxes, each 40px wide (no margins). - 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
- 39.True or false: <h1>My Site</h1> goes in script.js. (a) True (b) False
- 40.True or false: <input type="text"> takes only numbers. (a) True (b) False
Answer key
- 134
- hosts websites online
- a code editor
- Yes
- #0000ff
- 4
- element
- the gap round content
- <img>
- color
- True
- in a new tab
- False
- 1
- 214
- margin
- a pop-up box
- False
- </b>
- weak
- for
- False
- <body>
- 9
- JavaScript
- red
- False
- <ol>
- 12
- purple
- http
- Blue@Tiger_74
- No
- <li>
- 4
- riya2014
- 40
- 6
- False
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids