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 of these is not safe to do online? (a) keep passwords secret (b) check for https first (c) meet an online stranger (d) use a strong password
-
2.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Grapes</td><td>Mango</td><td>Orange</td></tr>
</table> -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) Our school bus (c) The full moon (d) width -
4.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> - 5.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 6.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 7.🏷️ Which is the closing tag for <em>? (a) <em> (b) <em/> (c) </em> (d) <\em>
-
8.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png - 9.🚀 Which program lets you see your web page while you build it? (a) a photo viewer (b) a music player (c) a web browser (d) a calculator
- 10.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
-
11.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) href (b) Maths fun (c) quiz.html (d) Art corner -
12.⚡ What number does this code print?
let a = 46;
let b = 6;
console.log(a - b); -
13.✍️ What is the selector in this CSS rule?
#top {
font-style: italic;
background-color: yellow;
width: 300px;
} (a) li (b) font-style (c) #top (d) yellow - 14.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) index.html (c) script.js
- 15.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) console.log() (c) let (d) for
- 16.🌍 Which one is the page’s address? (a) the browser (b) the URL (c) HTTPS (d) the server
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) Our school bus (c) bus.jpg (d) width - 18.⚡ Which tag holds JavaScript in a page? (a) <code> (b) <script> (c) <style> (d) <js>
-
19.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <b>My best friend</b>
line 3: <em>Our school trip (a) line 2 (b) line 1 (c) line 3 - 20.Which of these is margin? (a) a solid or dotted edge (b) space inside the border (c) the gap to other boxes (d) the gap round content
- 21.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 22.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <header> (c) <footer> (d) <nav>
- 23.True or false: in <img>, src tells which image to load. (a) True (b) False
-
24.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) contact.html (b) https://example.com (c) about.html (d) Take the quiz -
25.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Fun facts</p>
<h2>Cricket is fun.</h2> - 26.⚡ Which JavaScript word writes in the console? (a) if (b) for (c) let (d) console.log()
- 27.What is <input type="number"> for? (a) lets you tick many (b) is for an email address (c) sends the form (d) takes only numbers
- 28.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) opens web pages for us (d) sends pages over the net
-
29.🖌️ What colour are the letters?
h2 {
background-color: white;
color: purple;
text-align: right;
font-size: 28px;
} (a) purple (b) white (c) blue - 30.🎯 Which element does the selector #main style? (a) <span id="logo"> (b) <span id="main"> (c) <span class="main"> (d) <p class="box">
- 31.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
- 32.True or false: <a> goes in the head. (a) False (b) True
- 33.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
34.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Sky is blue<br>Kites fly high</p> -
35.⚖️ What colour is the text of this element?
<h1 class="red" id="end">Hi</h1>
CSS:
.red { color: yellow; }
.red { color: purple; } (a) purple (b) black (c) yellow (d) white - 36.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
-
37.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) maths.html (b) contact.html (c) https://example.com (d) Maths fun -
38.🔍 Which line is missing its closing tag?
line 1: <small>The red kite
line 2: <u>My pets</u>
line 3: <p>Our school trip</p> (a) line 3 (b) line 2 (c) line 1 -
39.🔁 How many numbers does this code print?
for (let i = 0; i < 8; i = i + 3) {
console.log(i);
} - 40.🎯 What kind of selector is .menu? (a) an element selector (b) a class selector (c) an id selector
Answer key
- meet an online stranger
- 3
- The full moon
- 300
- Yes
- No
- </em>
- kite.png
- a web browser
- <tr>
- Maths fun
- 40
- #top
- script.js
- alert()
- the URL
- Our school bus
- <script>
- line 3
- the gap to other boxes
- True
- <footer>
- True
- about.html
- 2
- console.log()
- takes only numbers
- sends pages over the net
- purple
- <span id="main">
- makes it harder
- False
- a closing tag
- 4
- purple
- <h6>
- contact.html
- line 1
- 3
- a class selector
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids