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 numbers does this code print?
for (let i = 0; i < 17; i = i + 4) {
console.log(i);
} -
2.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) Visit the site (b) contact.html (c) href (d) Maths fun -
3.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 300px;
padding: 25px;
border: 1px solid black;
margin: 5px;
} - 4.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <p> (d) <img>
- 5.Which of these is a strong password? (a) abcd1234 (b) iloveyou (c) 111111 (d) Chai$Cup_19x
- 6.Which of these is an empty tag? (a) <title> (b) <input> (c) <p> (d) <b>
-
7.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>The red kite</h2>
<h2>My pets</h2>
<h2>Good morning!</h2>
<p>My pets</p> -
8.🖌️ What colour is behind the letters?
h1 {
font-size: 16px;
color: red;
text-align: left;
background-color: orange;
} (a) green (b) red (c) orange -
9.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 10.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
- 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
- 12.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 13.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 14.Which of these is true of <article>? (a) holds one blog post (b) holds the logo and title (c) holds copyright notes (d) is the page’s key part
- 15.True or false: score = score + 1; goes in style.css. (a) True (b) False
- 16.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) index.html (c) style.css
- 17.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
- 18.True or false: padding is space inside the border. (a) True (b) False
- 19.⚡ Where does console.log() show its output? (a) in the console (b) in the address bar (c) on the title bar (d) on the printer
-
20.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 21.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
- 22.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 23.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
-
24.📊 How many cells does this table have in all?
<table>
<tr><td>Mango</td><td>Litchi</td><td>Jamun</td></tr>
<tr><td>Papaya</td><td>Orange</td><td>Orange</td></tr>
</table> - 25.📝 Which input type picks a day? (a) password (b) checkbox (c) radio (d) date
- 26.🛡️ Online: is it safe to use a nickname in games? (a) not safe (b) safe
- 27.🚀 Which file should this code go in: #top { color: blue; } (a) style.css (b) index.html (c) script.js
-
28.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 180px;
padding: 30px;
border: 2px solid black;
margin: 20px;
} - 29.What does font-weight do? (a) centres a heading (b) makes the text bold (c) colours behind the text (d) picks the font style
-
30.⚡ What number does this code print?
let marks = 24;
marks = marks + 2;
marks = marks - 23;
console.log(marks); - 31.🎨 One CSS file can style how many pages? (a) only one image (b) no pages (c) only one word (d) many pages
- 32.⚡ Which JavaScript word makes a new variable? (a) let (b) for (c) console.log() (d) alert()
- 33.True or false: the browser asks for a web page. (a) False (b) True
-
34.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Fun facts (c) I love mangoes. -
35.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) The full moon (b) dog.jpg (c) width (d) A happy dog - 36.📊 Which tag makes one data cell? (a) <tr> (b) <td> (c) <caption> (d) <table>
- 37.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="250"> - 39.True or false: CSS adds space around boxes. (a) False (b) True
- 40.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
Answer key
- 5
- Visit the site
- 362
- <meta charset="utf-8">
- Chai$Cup_19x
- <input>
- 2
- orange
- in a new tab
- screen-reader users
- src
- No
- <h5>
- holds one blog post
- False
- index.html
- <a href="about.html">
- True
- in the console
- in a new tab
- to describe the image
- <ul>
- <h6>
- 6
- date
- safe
- style.css
- 284
- makes the text bold
- 3
- many pages
- let
- True
- Fun facts
- A happy dog
- <td>
- 1
- 250
- True
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids