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 semantic tag sits at the very top? (a) <header> (b) <main> (c) <footer> (d) <nav>
- 2.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
- 3.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) helps everyone (b) makes it harder
- 4.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
-
5.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 8px;
}
} - 6.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Creative Sheet System (d) Cascading Style Sheets
- 7.True or false: padding is the text or picture. (a) False (b) True
- 8.✍️ In color: blue; which part is the property? (a) blue (b) color (c) : (d) ;
-
9.🖌️ What colour is behind the letters?
h2 {
font-size: 36px;
color: red;
text-align: left;
background-color: purple;
} (a) purple (b) white (c) red - 10.💬 Does the browser show comments on the page? (a) Yes (b) No
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
- 12.Which of these is true of a web browser? (a) sends pages over the net (b) hosts websites online (c) shows line numbers (d) opens web pages for us
- 13.Which of these does JavaScript do? (a) puts a picture on a page (b) makes a link (c) shows a pop-up message (d) lays out the page
- 14.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <tr> (c) inside the <head> (d) inside a <li>
- 15.True or false: the browser scrambles data on its way. (a) True (b) False
- 16.True or false: <title> has a closing tag. (a) True (b) False
-
17.🔁 How many times does this code print “Hello”?
for (let i = 0; i <= 2; i++) {
console.log("Hello");
} -
18.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) art.html (b) https://example.com (c) Visit the site (d) maths.html -
19.🖌️ What colour is behind the letters?
li {
text-align: center;
color: white;
background-color: black;
font-size: 40px;
} (a) black (b) white (c) orange - 20.🛡️ Online: is it safe to think before you post? (a) not safe (b) safe
- 21.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <h1> (c) <table> (d) <img>
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My drawings (b) index.html (c) Cricket Club (d) Thanks for visiting. - 23.True or false: HTML on its own can pick a random number. (a) True (b) False
-
24.⚡ What number does this code print?
let a = 4;
let b = 6;
console.log(a * b); -
25.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Visit the site (b) games.html (c) href (d) Maths fun - 26.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) <u> (d) </u>
- 27.True or false: HTML on its own cannot make tables. (a) False (b) True
- 28.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
- 29.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
-
30.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 10; i++) {
total = total + i;
}
console.log(total); -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) A happy dog (b) width (c) The full moon (d) dog.jpg - 32.True or false: HTML on its own cannot pick a random number. (a) False (b) True
-
33.⚖️ What colour is the text of this element?
<h2 class="big" id="end">Hi</h2>
CSS:
.big { color: black; }
#end { color: green; }
h2 { color: purple; } (a) blue (b) purple (c) green (d) black - 34.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 35.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) for (d) else
- 36.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
- 37.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <title>
-
38.🔍 Which line is missing its closing tag?
line 1: <u>Cricket is fun.
line 2: <small>Rain today</small>
line 3: <h2>Fun facts</h2> (a) line 3 (b) line 2 (c) line 1 - 39.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
- 40.✍️ Which sign ends each CSS declaration? (a) : (b) ; (c) , (d) .
Answer key
- <header>
- screen-reader users
- makes it harder
- a web server
- 8
- Cascading Style Sheets
- False
- color
- purple
- No
- a slash /
- opens web pages for us
- shows a pop-up message
- inside a <tr>
- False
- True
- 3
- https://example.com
- black
- safe
- <meta charset="utf-8">
- Cricket Club
- False
- 24
- Visit the site
- </u>
- False
- </h2>
- in the body
- 55
- A happy dog
- True
- green
- True
- for
- a paragraph
- <title>
- line 1
- to leave notes
- ;
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids