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.🔁 What is the LAST number this code prints?
for (let i = 0; i < 17; i = i + 2) {
console.log(i);
} -
2.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Good morning!</h2>
<p>My pets</p>
<h2>I love mangoes.</h2> -
3.🖌️ What colour are the letters?
p {
text-align: left;
color: red;
font-size: 28px;
background-color: green;
} (a) red (b) green (c) blue -
4.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Contact us (b) games.html (c) href (d) Visit the site -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) dog.jpg (b) A happy dog (c) The full moon (d) width - 6.📝 Which input type sends the form? (a) password (b) submit (c) email (d) date
- 7.🚀 Which file is best for the colours and fonts? (a) index.html (b) photo.jpg (c) style.css (d) script.js
- 8.🧭 Who is helped most by semantic tags? (a) only the server (b) nobody (c) only the printer (d) screen-reader users
- 9.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
- 10.🔐 Is 111111 a strong or a weak password? (a) weak (b) strong
- 11.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
-
12.🔁 How many numbers does this code print?
for (let i = 0; i < 8; i = i + 2) {
console.log(i);
} -
13.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 140px;
justify-content: flex-start;
}
Inside are 2 boxes, each 60px wide (no margins). - 14.💬 Does the browser show comments on the page? (a) No (b) Yes
- 15.What does text-align do? (a) centres a heading (b) picks the font style (c) colours behind the text (d) sets the letter colour
-
16.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets -
17.🔁 What does this code print?
let marks = 36;
if (marks < 37) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass - 18.Which of these is safe to do online? (a) post your home address (b) think before you post (c) click prize links (d) type a password on http
- 19.True or false: <table> holds the whole table. (a) False (b) True
-
20.⚡ What number does this code print?
let marks = 7;
marks = marks + 18;
marks = marks - 1;
console.log(marks); -
21.✍️ What value is given to border in this rule?
li {
width: 300px;
font-style: italic;
border: 2px solid;
} (a) italic (b) 300px (c) 2px solid (d) border -
22.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2> - 23.Which of these goes in the head? (a) <a> (b) <ul> (c) <p> (d) <title>
-
24.🖌️ How big is the text, in px?
li {
background-color: white;
font-size: 36px;
text-align: center;
color: blue;
} - 25.True or false: <ol> shows bullet points. (a) True (b) False
- 26.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h1> (b) <h5> (c) <h4> (d) <h2>
- 27.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
-
28.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) Contact us (b) href (c) About us (d) art.html - 29.True or false: <p>Hello!</p> goes in script.js. (a) False (b) True
-
30.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 320px;
justify-content: flex-end;
}
Inside are 3 boxes, each 80px wide (no margins). -
31.⚡ What number does this code print?
let a = 19;
let b = 24;
console.log(a + b); -
32.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My best friend</p> - 33.🌍 What finds the server for a domain name like example.com? (a) HTML (b) DNS (c) alt (d) CSS
-
34.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> - 35.Which of these is a closing tag? (a) <p> (b) </b> (c) <li> (d) <body>
-
36.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<p>Good morning!</p> - 37.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
-
38.📊 How many cells does this table have in all?
<table>
<tr><td>Guava</td><td>Jamun</td><td>Banana</td></tr>
<tr><td>Guava</td><td>Papaya</td><td>Guava</td></tr>
<tr><td>Mango</td><td>Guava</td><td>Orange</td></tr>
<tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
</table> - 39.♿ What does good colour contrast mean? (a) text stands out clearly (b) many bright colours (c) only red text (d) no colours at all
- 40.True or false: margin is space outside the border. (a) True (b) False
Answer key
- 16
- 2
- red
- Contact us
- A happy dog
- submit
- style.css
- screen-reader users
- the screen width
- weak
- packs boxes at the end
- 4
- 20
- No
- centres a heading
- numbers
- Pass
- think before you post
- True
- 24
- 2px solid
- 2
- <title>
- 36
- False
- <h1>
- width
- About us
- False
- 80
- 43
- 3
- DNS
- 1
- </b>
- 4
- 1
- 12
- text stands out clearly
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids