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 many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> --> -
2.🔁 What does this code print?
let score = 22;
if (score >= 26) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 3.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
-
4.⚡ What number does this code print?
let apples = 29;
apples = apples + 8;
apples = apples - 20;
console.log(apples); - 5.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) white (d) red
-
6.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> --> - 7.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) for (d) else
- 8.True or false: padding is space inside the border. (a) True (b) False
- 9.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
-
10.📝 How many <input> tags are in this form?
<form>
<input type="email">
<input type="number">
<input type="submit" value="Send">
</form> -
11.🔍 Which line is missing its closing tag?
line 1: <h2>My best friend</h2>
line 2: <i>Fun facts</i>
line 3: <h3>The red kite (a) line 3 (b) line 2 (c) line 1 -
12.🔗 Which words do you click on?
<a href="quiz.html">Contact us</a> (a) quiz.html (b) Visit the site (c) href (d) Contact us - 13.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 14.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
-
15.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h4>Hello, world!</h4>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Hello, world!</p> -
16.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 140px;
justify-content: center;
}
Inside are 2 boxes, each 50px wide (no margins). -
17.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<h3>The red kite
<small>My pets</small> (a) </h3> (b) </small> (c) </b> (d) </em> - 18.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
- 19.🎯 How many elements on a page should have the same id? (a) 1 (b) any number (c) 2 (d) 5
- 20.📊 Which tag gives the table a title? (a) <th> (b) <caption> (c) <td> (d) <table>
- 21.🌈 Which colour is #000000? (a) magenta (b) red (c) white (d) black
-
22.🔗 Where does this link open?
<a href="games.html">About us</a> (a) in a new tab (b) in the same tab - 23.🎯 Which element does the selector li style? (a) <p id="hero"> (b) <li class="box"> (c) <div> (d) <span class="box">
- 24.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
-
25.🎯 Which CSS selector matches this element?
<div class="note" id="intro">Hello</div> (a) .intro (b) #intro (c) span (d) #note - 26.True or false: HTTPS asks for a web page. (a) False (b) True
- 27.True or false: in <img>, src describes the picture. (a) True (b) False
- 28.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
-
29.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 1024px) {
p {
font-size: 22px;
}
} - 30.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
31.🖌️ What colour are the letters?
h2 {
color: orange;
font-size: 12px;
background-color: green;
text-align: right;
} (a) orange (b) yellow (c) green - 32.Which of these is not safe to do online? (a) check for https first (b) share your password (c) use a strong password (d) use a nickname in games
- 33.Which colour pair is easy to read? (a) yellow on white (b) black on white (c) light grey on white (d) blue on purple
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) kite.png (b) Map of India (c) width (d) A red kite - 35.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <u> (d) <\u>
-
36.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Grapes</td><td>Guava</td><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Orange</td><td>Banana</td><td>Grapes</td><td>Papaya</td></tr>
<tr><td>Papaya</td><td>Banana</td><td>Banana</td><td>Grapes</td></tr>
</table> - 37.🌈 Which colour of light is strongest in rgb(5, 173, 25)? (a) red (b) blue (c) green
- 38.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 39.True or false: in <img>, src sets how wide it is. (a) False (b) True
-
40.⚡ What does this code show?
let name = "Arjun";
alert("Hello, " + name + "!"); (a) Arjun (b) Hello, Arjun! (c) Hello, name! (d) name
Answer key
- 1
- Play again
- <a>
- 17
- bright green
- 2
- for
- True
- width
- 3
- line 3
- Contact us
- a closing tag
- text with links
- 2
- 20
- </h3>
- easy to read
- 1
- <caption>
- black
- in the same tab
- <li class="box">
- 1
- #intro
- False
- False
- safe
- 16
- Yes
- orange
- share your password
- black on white
- A red kite
- </u>
- 4
- green
- an opening tag
- False
- Hello, Arjun!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids