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 does this code make?
<p>My pets</p>
<p>My pets</p>
<p>Our school trip</p> - 2.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
-
3.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Papaya</td><td>Banana</td></tr>
</table> -
4.🎯 Which CSS selector matches this element?
<li class="big" id="end">Hello</li> (a) .end (b) #big (c) #end (d) #hero -
5.🔍 Which line is missing its closing tag?
line 1: <em>Hello, world!</em>
line 2: <h2>The red kite</h2>
line 3: <i>My best friend (a) line 3 (b) line 1 (c) line 2 - 6.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
- 7.🌍 Which one scrambles data on its way? (a) HTTPS (b) the server (c) the URL (d) the browser
-
8.🖌️ What colour are the letters?
h1 {
background-color: yellow;
text-align: left;
font-size: 24px;
color: white;
} (a) white (b) black (c) yellow - 9.📝 Which tag gives a form box a name you can click? (a) <title> (b) <hr> (c) <h1> (d) <label>
-
10.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) contact.html (b) about.html (c) Take the quiz (d) games.html - 11.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) : (d) -
-
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) My Hobbies (c) index.html (d) My drawings - 13.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
- 14.✍️ How does a CSS comment start? (a) // (b) /* (c) <!-- (d) #
-
15.🌍 What is the domain name in this URL?
http://learn.example.com/maths/tables.html (a) http (b) learn.example.com (c) /maths/tables.html (d) www.example.com - 16.What does text-align do? (a) colours behind the text (b) makes the text bold (c) centres a heading (d) makes letters bigger
- 17.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
- 19.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 20.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
-
21.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 600px) {
p {
font-size: 18px;
}
} (a) No (b) Yes - 22.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
- 23.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
24.⚡ What number does this code print?
let coins = 19;
coins = coins + 7;
coins = coins - 4;
console.log(coins); - 25.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
- 26.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
27.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) art.html (c) School news (d) Take the quiz - 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
- 29.True or false: margin is space inside the border. (a) False (b) True
-
30.🔁 How many times does this code print “Hi”?
for (let i = 0; i <= 5; i++) {
console.log("Hi");
} -
31.✍️ How many declarations (property: value pairs) are in this rule?
#top {
width: 300px;
margin: 10px;
color: red;
} - 32.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) flex-end (c) space-between (d) center
- 33.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
- 34.🧩 Which language makes headings and lists? (a) CSS (b) HTML (c) JavaScript
- 35.🔢 When you open a web page, which comes first: “the browser shows it” or “the server sends files”? (a) the server sends files (b) the browser shows it
- 36.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) style.css (c) index.html
- 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
- 38.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 39.🧭 How many <main> parts should a page have? (a) one (b) none (c) three (d) ten
- 40.True or false: in <img>, width names the picture file. (a) False (b) True
Answer key
- 3
- style.css
- 2
- #end
- line 3
- a paragraph
- HTTPS
- white
- <label>
- games.html
- :
- My Hobbies
- the screen width
- /*
- learn.example.com
- centres a heading
- <h1>
- element
- has a closing tag
- to leave notes
- No
- <h1>
- an empty tag
- 22
- #
- in the body
- School news
- <img>
- False
- 6
- 3
- space-between
- not semantic
- HTML
- the server sends files
- index.html
- as one space
- has a closing tag
- one
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids