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.True or false: #main is an id selector. (a) False (b) True
-
2.🔗 Which words do you click on?
<a href="maths.html">Visit the site</a> (a) href (b) Visit the site (c) maths.html (d) Maths fun -
3.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep -
4.🌍 What is the protocol in this URL?
https://kids.example.org/index.html (a) kids.example.org (b) /index.html (c) http (d) https - 5.What does background-color do? (a) makes letters bigger (b) sets the letter colour (c) picks the font style (d) colours behind the text
- 6.Which of these goes in the body? (a) <style> (b) <title> (c) <link rel="stylesheet"> (d) <p>
- 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
8.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<i>Hello, world!</i>
<b>The red kite (a) </strong> (b) </i> (c) </h1> (d) </b> - 9.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) center (c) flex-end (d) space-between
-
10.🔒 Is the connection to this address scrambled (encrypted)?
https://kids.example.org/games/chess.html (a) Yes (b) No - 11.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 12.Which of these does HTML do? (a) rounds box corners (b) makes a form box (c) lays out the page (d) reacts to a button click
-
13.⚡ What number does this code print?
let runs = 15;
runs = runs + 20;
runs = runs - 11;
console.log(runs); - 14.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) only the printer (d) nobody
- 15.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 16.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <h1> (d) <link rel="stylesheet">
-
17.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>Cricket is fun.</p> --> (a) Fun facts (b) Cricket is fun. (c) I love mangoes. (d) Rain today - 18.🔍 Which is the odd one out? (a) lays out the page (b) checks a quiz answer (c) sets colours and fonts (d) adds space around boxes
- 19.True or false: <meta> has a closing tag. (a) False (b) True
- 20.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 21.True or false: <table> gives the table a title. (a) True (b) False
-
22.⚖️ What colour is the text of this element?
<h1 class="menu" id="main">Hi</h1>
CSS:
.menu { color: white; }
#main { color: orange; }
h1 { color: green; } (a) green (b) yellow (c) white (d) orange - 23.Which of these is the border? (a) the gap round content (b) space inside the border (c) the text or picture (d) the line round the box
-
24.🔁 How many times does this code print “Well done”?
for (let i = 3; i <= 8; i++) {
console.log("Well done");
} -
25.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="email">
<input type="text">
<input type="submit" value="Send">
</form> - 26.📦 In the box model, which part is the gap round content? (a) border (b) margin (c) padding (d) content
- 27.🔢 To build and share your first web page, which comes FIRST? (a) add CSS styles (b) test in a browser (c) plan what to show (d) write the HTML
-
28.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 29.True or false: <h1>My Site</h1> goes in style.css. (a) False (b) True
-
30.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Jamun</td><td>Grapes</td><td>Guava</td></tr>
<tr><td>Orange</td><td>Banana</td><td>Papaya</td></tr>
</table> - 31.True or false: <li> is one item of a list. (a) False (b) True
- 32.🎨 One CSS file can style how many pages? (a) only one image (b) many pages (c) no pages (d) only one word
-
33.🎯 Which CSS selector matches this element?
<li class="menu" id="main">Hello</li> (a) .main (b) .note (c) li (d) #menu -
34.📊 How many rows does this table have?
<table>
<tr><td>Jamun</td><td>Banana</td><td>Guava</td><td>Banana</td></tr>
<tr><td>Orange</td><td>Orange</td><td>Banana</td><td>Orange</td></tr>
</table> - 35.🎯 How many elements on a page should have the same id? (a) 1 (b) 5 (c) 2 (d) any number
- 36.True or false: .big is a class selector. (a) True (b) False
- 37.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
- 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
-
39.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Orange</td><td>Jamun</td><td>Litchi</td><td>Grapes</td></tr>
<tr><td>Mango</td><td>Jamun</td><td>Grapes</td><td>Banana</td></tr>
</table> -
40.⚡ What number does this code print?
let score = 7;
score = score + 4;
score = score - 4;
console.log(score);
Answer key
- True
- Visit the site
- tiger.jpg
- https
- colours behind the text
- <p>
- Yes
- </b>
- flex-end
- Yes
- <a>
- makes a form box
- 24
- screen-reader users
- True
- <h1>
- Cricket is fun.
- checks a quiz answer
- False
- an opening tag
- False
- orange
- the line round the box
- 6
- 4
- padding
- plan what to show
- in a new tab
- False
- 9
- True
- many pages
- li
- 2
- 1
- True
- starts a new line
- <!--
- 12
- 7
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids