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 does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
- 2.⚡ What does JavaScript add to a web page? (a) the page title (b) actions and changes (c) the domain name (d) only colours
- 3.True or false: <article> holds one blog post. (a) False (b) True
- 4.True or false: <ol> is an ordered list. (a) False (b) True
-
5.🔁 What does this code print?
let age = 22;
if (age < 11) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
6.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 300px;
justify-content: space-between;
}
Inside are 3 boxes, each 60px wide (no margins). - 7.🔁 Which loop repeats code a set number of times? (a) else (b) if (c) let (d) for
- 8.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
-
9.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 150px;
justify-content: space-between;
}
Inside are 2 boxes, each 50px wide (no margins). - 10.True or false: <footer> sits at the bottom. (a) False (b) True
-
11.🔍 One closing tag is missing. Which one?
<b>Cricket is fun.
<em>Rain today</em>
<i>The red kite</i> (a) </h2> (b) </em> (c) </b> (d) </i> - 12.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
-
13.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) Space Facts (b) My drawings (c) I like to read. (d) body - 14.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
- 15.Which of these is not safe to do online? (a) use a nickname in games (b) keep passwords secret (c) ask before downloading (d) download from pop-ups
- 16.🛡️ Online: is it safe to think before you post? (a) safe (b) not safe
- 17.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
-
18.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 5;
console.log(x + y); (a) 35 (b) 8 (c) Error - 19.Which of these is an opening tag? (a) </body> (b) </h1> (c) </li> (d) <p>
-
20.⚡ What does this code show?
let name = "Meera";
console.log("Well done, " + name + "!"); (a) Well done, name! (b) name (c) Well done, Meera! (d) Meera - 21.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 22.📊 Which tag makes one table row? (a) <caption> (b) <tr> (c) <th> (d) <table>
-
23.🔍 Which line is missing its closing tag?
line 1: <strong>My pets</strong>
line 2: <small>I love mangoes.</small>
line 3: <em>Fun facts (a) line 1 (b) line 3 (c) line 2 - 24.🔍 Which is the odd one out? (a) sets colours and fonts (b) makes headings and lists (c) makes a form box (d) makes a link
- 25.Which of these is padding? (a) space outside the border (b) the text or picture (c) space inside the border (d) the gap to other boxes
- 26.Which of these is safe to do online? (a) share your password (b) type a password on http (c) use a nickname in games (d) post your home address
- 27.🔁 When does the else part run? (a) when if is true (b) when if is false (c) always (d) never
-
28.📱 The screen is 414px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 1024px) {
p {
font-size: 16px;
}
} (a) No (b) Yes - 29.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
-
30.📊 How many cells are in each row?
<table>
<tr><td>Orange</td><td>Orange</td><td>Litchi</td><td>Guava</td></tr>
<tr><td>Jamun</td><td>Banana</td><td>Litchi</td><td>Jamun</td></tr>
<tr><td>Orange</td><td>Mango</td><td>Jamun</td><td>Guava</td></tr>
<tr><td>Papaya</td><td>Mango</td><td>Banana</td><td>Guava</td></tr>
</table> - 31.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
-
32.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) contact.html (c) Play games (d) Take the quiz - 33.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) turned off (c) 600px or wider (d) 600px or narrower
- 34.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) share it with friends (c) type the password (d) close it, tell an adult
-
35.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 130px;
padding: 5px;
border: 1px solid black;
margin: 20px;
} -
36.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Guava</li>
</ul> (a) numbers (b) bullets - 37.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
- 38.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
-
39.🔁 How many times does this code print “Hi”?
for (let i = 1; i <= 4; i++) {
console.log("Hi");
} -
40.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 1024px) {
p {
font-size: 26px;
}
}
Answer key
- opens it in a new tab
- actions and changes
- True
- True
- child
- 60
- for
- <ol>
- 50
- True
- </b>
- <h5>
- My drawings
- an element selector
- download from pop-ups
- safe
- weak
- 35
- <p>
- Well done, Meera!
- on the browser tab
- <tr>
- line 3
- sets colours and fonts
- space inside the border
- use a nickname in games
- when if is false
- No
- a web server
- 4
- helps everyone
- Take the quiz
- 600px or narrower
- close it, tell an adult
- 182
- bullets
- a slash /
- the viewport meta tag
- 4
- 20
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids