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 text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Rain today</p> (a) Our school trip (b) The red kite (c) Rain today (d) Cricket is fun. - 2.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
- 3.Which of these is safe to do online? (a) download from pop-ups (b) use a nickname in games (c) type a password on http (d) click prize links
-
4.🔁 How many times does this code print “Hi”?
for (let i = 3; i < 9; i++) {
console.log("Hi");
} -
5.✍️ What value is given to font-weight in this rule?
h2 {
font-weight: bold;
text-align: center;
font-style: italic;
border: 2px solid;
} (a) 2px solid (b) bold (c) 300px (d) font-weight - 6.True or false: the URL is the page’s address. (a) False (b) True
-
7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 280px;
padding: 20px;
border: 3px solid black;
margin: 5px;
} -
8.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Banana</td><td>Orange</td><td>Litchi</td><td>Grapes</td></tr>
<tr><td>Jamun</td><td>Mango</td><td>Guava</td><td>Mango</td></tr>
</table> - 9.Which of these is the content? (a) the gap round content (b) the text or picture (c) the line round the box (d) the gap to other boxes
- 10.⚡ Which JavaScript word writes in the console? (a) let (b) console.log() (c) alert() (d) if
-
11.✍️ How many declarations (property: value pairs) are in this rule?
p {
font-weight: bold;
width: 300px;
} -
12.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 8; i++) {
total = total + i;
}
console.log(total); -
13.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>I love mangoes.</h4>
<h2>Hello, world!</h2>
<p>Rain today</p> - 14.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
- 15.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Blue@Tiger_74 (d) 111111
- 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
17.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p> - 18.Which of these is not safe to do online? (a) ask before downloading (b) tell a trusted adult (c) type a password on http (d) use a strong password
- 19.🧭 Which semantic tag holds extra side notes? (a) <header> (b) <footer> (c) <aside> (d) <nav>
- 20.True or false: in <img>, height tells which image to load. (a) False (b) True
- 21.🔢 In a basic web page file, which comes first: “</head>” or “</body>”? (a) </head> (b) </body>
- 22.Which of these is a strong password? (a) 111111 (b) Mango#Kite29! (c) 123456 (d) abcd1234
- 23.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
- 24.True or false: p { color: red; } goes in index.html. (a) True (b) False
-
25.🔁 How many numbers does this code print?
for (let i = 0; i < 14; i = i + 2) {
console.log(i);
} - 26.True or false: the border is a solid or dotted edge. (a) False (b) True
-
27.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Blue
<input type="checkbox" name="colour"> Red
<input type="checkbox" name="colour"> Pink
<input type="checkbox" name="colour"> Green
<input type="checkbox" name="colour"> Orange
</form> -
28.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 3;
console.log(x + y); (a) Error (b) 63 (c) 9 - 29.Which of these does CSS do? (a) counts down a timer (b) changes the page live (c) sets colours and fonts (d) gives the page structure
- 30.🚀 Which file should this code go in: console.log(5 + 2); (a) index.html (b) script.js (c) style.css
-
31.🌍 What is the protocol in this URL?
https://learn.example.com/about.html (a) learn.example.com (b) https (c) http (d) /about.html - 32.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <li>
-
33.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) kite.png (b) tiger.jpg (c) An old fort (d) fort.jpg -
34.⚡ What number does this code print?
let score = 10;
score = score + 2;
score = score - 11;
console.log(score); - 35.📱 Responsive design means a page ___. (a) has no pictures (b) never changes (c) is only for laptops (d) fits every screen
- 36.True or false: HTML on its own can keep a high score. (a) True (b) False
- 37.📊 Which tag makes one table row? (a) <table> (b) <caption> (c) <td> (d) <tr>
- 38.Which of these goes in the body? (a) <title> (b) <style> (c) <img> (d) <meta charset="utf-8">
- 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) </head>
- 40.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
Answer key
- Cricket is fun.
- <img>
- use a nickname in games
- 6
- bold
- True
- 326
- 3
- the text or picture
- console.log()
- 2
- 36
- 3
- opens it in a new tab
- 111111
- Yes
- 3
- type a password on http
- <aside>
- False
- </head>
- Mango#Kite29!
- 6
- False
- 7
- True
- 5
- 63
- sets colours and fonts
- script.js
- https
- <li>
- fort.jpg
- 1
- fits every screen
- False
- <tr>
- <img>
- </html>
- <!--
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids