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 line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <h2>Fun facts
line 3: <i>Our school trip</i> (a) line 2 (b) line 1 (c) line 3 - 2.True or false: <li> is one item of a list. (a) False (b) True
- 3.True or false: HTML on its own can add pictures to a page. (a) False (b) True
- 4.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 5.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
- 6.Which of these is the content? (a) the gap round content (b) the text or picture (c) space inside the border (d) the gap to other boxes
- 7.True or false: in <img>, width shows if the image fails. (a) True (b) False
- 8.True or false: .big is a class selector. (a) False (b) True
-
9.🔁 What does this code print?
let marks = 40;
if (marks > 13) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass - 10.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) style.css (c) index.html (d) script.js
- 11.🎯 Which sign starts an id selector? (a) . (b) & (c) # (d) @
- 12.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) <html>
-
13.🖌️ What colour are the letters?
h2 {
background-color: purple;
font-size: 40px;
color: blue;
text-align: left;
} (a) white (b) purple (c) blue -
14.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> - 15.True or false: <tr> makes one table row. (a) False (b) True
-
16.⚖️ What colour is the text of this element?
<p class="red" id="logo">Hi</p>
CSS:
#logo { color: green; }
#logo { color: red; } (a) green (b) white (c) red (d) blue - 17.Which of these is a strong password? (a) 111111 (b) Blue@Tiger_74 (c) 123456 (d) riya2014
- 18.🔁 When does the else part run? (a) always (b) when if is true (c) never (d) when if is false
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) An old fort (b) width (c) fort.jpg (d) A tiger asleep - 20.True or false: in <img>, width tells which image to load. (a) True (b) False
-
21.🖌️ How big is the text, in px?
p {
text-align: center;
background-color: green;
color: red;
font-size: 12px;
} -
22.✍️ What is the selector in this CSS rule?
.box {
font-style: italic;
margin: 10px;
font-size: 20px;
} (a) h2 (b) .box (c) 10px (d) font-style - 23.Which of these goes in the head? (a) <img> (b) <h1> (c) <a> (d) <style>
-
24.⚡ What number does this code print?
let coins = 27;
coins = coins + 7;
coins = coins - 1;
console.log(coins); -
25.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="email">
<input type="submit" value="Send">
</form> -
26.🔁 How many times does this code print “Well done”?
for (let i = 3; i < 5; i++) {
console.log("Well done");
} - 27.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
- 28.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
-
29.✍️ How many declarations (property: value pairs) are in this rule?
h2 {
background-color: yellow;
padding: 8px;
} -
30.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 2;
}
console.log(total); - 31.True or false: #main is an element selector. (a) False (b) True
- 32.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
- 33.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
- 34.True or false: <p> goes in the head. (a) False (b) True
- 35.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the address bar (d) in the console
- 36.True or false: <caption> gives the table a title. (a) False (b) True
-
37.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 5; i++) {
total = total + 9;
}
console.log(total); -
38.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>My pets</p> (a) My pets (b) I love mangoes. (c) Hello, world! (d) Rain today -
39.🔗 Where does this link open?
<a href="games.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 40.True or false: HTML makes headings and lists. (a) False (b) True
Answer key
- line 2
- True
- True
- in the head
- <h5>
- the text or picture
- False
- True
- Pass
- script.js
- #
- </html>
- blue
- 1
- True
- red
- Blue@Tiger_74
- when if is false
- An old fort
- False
- 12
- .box
- <style>
- 33
- 3
- 2
- not safe
- <h1>
- 2
- 12
- False
- 185
- <ul>
- False
- in the console
- True
- 45
- Rain today
- in a new tab
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids