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 one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
- 2.True or false: <ul> is an empty tag. (a) False (b) True
-
3.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); - 4.True or false: <input type="checkbox"> lets you tick many. (a) False (b) True
-
5.📊 How many cells does this table have in all?
<table>
<tr><td>Mango</td><td>Guava</td></tr>
<tr><td>Papaya</td><td>Guava</td></tr>
</table> -
6.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 400px;
justify-content: flex-start;
}
Inside are 4 boxes, each 80px wide (no margins). - 7.True or false: CSS reacts to a button click. (a) False (b) True
-
8.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 80px;
padding: 10px;
border: 1px solid black;
margin: 10px;
} - 9.True or false: in <img>, alt names the picture file. (a) False (b) True
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) The full moon (b) moon.png (c) Our school bus (d) width - 11.📝 Which input type hides what you type? (a) date (b) password (c) email (d) text
- 12.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) answers page requests (d) stores a website’s files
-
13.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Cricket is fun. (c) Hello, world! -
14.🔗 Which address opens when you click this link?
<a href="contact.html">About us</a> (a) contact.html (b) About us (c) maths.html (d) https://example.com -
15.⚖️ What colour is the text of this element?
<h2 class="menu" id="end">Hi</h2>
CSS:
h2 { color: blue; }
h2 { color: orange; } (a) purple (b) orange (c) black (d) blue - 16.🎯 Which element does the selector .star style? (a) <p class="note"> (b) <span class="star"> (c) <span class="menu"> (d) <span id="star">
-
17.🔁 What is the LAST number this code prints?
for (let i = 0; i < 5; i = i + 2) {
console.log(i);
} - 18.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
- 19.🔢 To build and share your first web page, which comes first: “plan what to show” or “write the HTML”? (a) plan what to show (b) write the HTML
-
20.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My best friend</p> - 21.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
- 23.🖌️ Which CSS property sets the letter colour? (a) font-family (b) color (c) font-weight (d) font-size
- 24.♿ Who uses a screen reader? (a) only coders (b) only robots (c) people who are blind (d) only teachers
- 25.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) has an address bar (d) opens web pages for us
- 26.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.🧩 Which language changes the page live? (a) HTML (b) CSS (c) JavaScript
- 28.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
- 29.🔍 Which is the odd one out? (a) makes a link (b) makes a form box (c) checks a quiz answer (d) makes headings and lists
- 30.🌍 What does a web address (URL) tell the browser? (a) your password (b) where the page is (c) how old you are (d) the page colour
-
31.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Hello, world!</p>
<p>I love mangoes.</p> - 32.What does font-family do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes letters bigger
-
33.🔁 What does this code print?
let temp = 34;
if (temp >= 26) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool -
34.✍️ What value is given to background-color in this rule?
body {
background-color: yellow;
font-style: italic;
} (a) 10px (b) yellow (c) 8px (d) background-color - 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 36.True or false: <li> is an unordered list. (a) True (b) False
-
37.🔁 What does this code print?
let age = 15;
if (age < 29) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 38.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Language (d) Laptop
- 39.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
- 40.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it makes text red (d) it loads faster
Answer key
- the URL
- False
- 36
- True
- 4
- 80
- False
- 102
- False
- The full moon
- password
- opens web pages for us
- Cricket is fun.
- contact.html
- orange
- <span class="star">
- 4
- <h6>
- plan what to show
- 1
- an empty tag
- the later one
- color
- people who are blind
- shows line numbers
- an empty tag
- JavaScript
- href
- checks a quiz answer
- where the page is
- 1
- picks the font style
- Hot
- yellow
- <a>
- False
- teen
- Language
- src
- it tells its meaning
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids