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 big is the text, in px?
h1 {
text-align: left;
color: yellow;
font-size: 28px;
background-color: blue;
} -
2.⚖️ What colour is the text of this element?
<p class="menu" id="end">Hi</p>
CSS:
p { color: white; }
#end { color: orange; } (a) yellow (b) orange (c) white (d) red - 3.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
- 4.True or false: to think before you post is not safe. (a) True (b) False
-
5.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 16px;
}
} (a) Yes (b) No -
6.✍️ What is the selector in this CSS rule?
.box {
background-color: yellow;
font-size: 20px;
} (a) 20px (b) background-color (c) .box (d) h2 - 7.♿ Who uses a screen reader? (a) only coders (b) only teachers (c) people who are blind (d) only robots
- 8.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 9.True or false: alert(score); goes in style.css. (a) False (b) True
-
10.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> (a) I love mangoes. (b) The red kite (c) Fun facts -
11.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>I love mangoes.</h2>
<h3>My pets</h3>
<p>Good morning!</p>
<h2>Our school trip</h2> - 12.Which of these is the content? (a) the gap to other boxes (b) the line round the box (c) a solid or dotted edge (d) the text or picture
- 13.What does font-size do? (a) makes letters bigger (b) colours behind the text (c) centres a heading (d) sets the letter colour
-
14.⚡ What does this code print? (Look at the quotes!)
let x = "7";
let y = 2;
console.log(x + y); (a) 72 (b) 9 (c) Error - 15.🧭 Which semantic tag sits at the very top? (a) <header> (b) <footer> (c) <aside> (d) <nav>
- 16.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) black
-
17.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Birds sing<br>Kites fly high</p> -
18.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) About us (b) href (c) Play games (d) games.html - 19.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
- 20.True or false: CSS puts a picture on a page. (a) True (b) False
-
21.⚖️ What colour is the text of this element?
<p class="star" id="main">Hi</p>
CSS:
.star { color: blue; }
#main { color: white; } (a) green (b) white (c) blue (d) black - 22.🔢 To build and share your first web page, which comes first: “publish it online” or “write the HTML”? (a) write the HTML (b) publish it online
- 23.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) space-between (d) flex-end
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
25.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) My pets (b) Rain today (c) My best friend -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) My drawings (b) My Hobbies (c) index.html (d) Here is my best one. -
27.✍️ Which property is set to 300px in this rule?
li {
text-align: center;
width: 300px;
} (a) font-style (b) 300px (c) width (d) color - 28.True or false: in <img>, height shows if the image fails. (a) False (b) True
- 29.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <js> (c) <style> (d) <code>
-
30.📱 The screen is 1366px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} (a) Yes (b) No -
31.🔁 How many times does this code print “Hello”?
for (let i = 2; i < 11; i++) {
console.log("Hello");
} - 32.🔢 To build and share your first web page, which comes first: “add CSS styles” or “plan what to show”? (a) plan what to show (b) add CSS styles
-
33.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Rivers flow</p> - 34.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
- 35.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 36.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 37.🌈 Which colour is #00ff00? (a) white (b) yellow (c) bright green (d) red
- 38.True or false: h1 is an element selector. (a) False (b) True
-
39.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Litchi</td><td>Banana</td><td>Mango</td><td>Guava</td></tr>
</table> -
40.⚡ What number does this code print?
let a = 56;
let b = 2;
console.log(a - b);
Answer key
- 28
- orange
- alt
- False
- No
- .box
- people who are blind
- <ol>
- False
- The red kite
- 4
- the text or picture
- makes letters bigger
- 72
- <header>
- yellow
- 4
- Play games
- <h6>
- False
- white
- write the HTML
- flex-start
- bullets
- My best friend
- My Hobbies
- width
- False
- <script>
- No
- 9
- plan what to show
- 3
- makes it harder
- <h5>
- Yes
- bright green
- True
- 2
- 54
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids