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 line is missing its closing tag?
line 1: <h3>My pets
line 2: <u>I love mangoes.</u>
line 3: <b>The red kite</b> (a) line 2 (b) line 1 (c) line 3 - 2.Which of these is a weak password? (a) Mango#Kite29! (b) 111111 (c) Chai$Cup_19x (d) S0lar!Pen#8
- 3.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) test in a browser (b) add CSS styles
-
4.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p>
<p>My best friend</p>
<p>Our school trip</p> (a) My pets (b) My best friend (c) Our school trip (d) Cricket is fun. - 5.Which of these does HTML do? (a) shows a pop-up message (b) changes the page live (c) rounds box corners (d) gives the page structure
- 6.📦 In the box model, which part is space outside the border? (a) padding (b) border (c) content (d) margin
-
7.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Good morning! (b) I love mangoes. (c) Hello, world! -
8.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg - 9.True or false: <ol> is an ordered list. (a) False (b) True
- 10.True or false: <table> makes a heading cell. (a) True (b) False
- 11.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
-
12.🌍 What is the protocol in this URL?
http://www.example.net/news/today.html (a) /news/today.html (b) www.example.net (c) http (d) https - 13.True or false: HTML gives the page structure. (a) False (b) True
-
14.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Roses are red</p> - 15.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) helps everyone (b) makes it harder
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
-
17.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + i;
}
console.log(total); -
18.🔁 What does this code print?
let temp = 12;
if (temp < 14) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot -
19.⚖️ What colour is the text of this element?
<h2 class="note" id="logo">Hi</h2>
CSS:
h2 { color: blue; }
h2 { color: green; } (a) blue (b) purple (c) green (d) white - 20.🚀 Which file should this code go in: <p>Hello!</p> (a) script.js (b) style.css (c) index.html
-
21.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 230px;
justify-content: space-between;
}
Inside are 3 boxes, each 50px wide (no margins). - 22.🌈 Which colour of light is strongest in rgb(85, 1, 227)? (a) red (b) green (c) blue
- 23.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
- 24.📊 Which tag makes one data cell? (a) <tr> (b) <td> (c) <th> (d) <table>
- 25.🎯 What kind of selector is .note? (a) an id selector (b) a class selector (c) an element selector
-
26.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> -
27.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> - 28.⚡ Which JavaScript word writes in the console? (a) if (b) let (c) alert() (d) console.log()
- 29.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
-
30.🔗 Where does this link open?
<a href="about.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 31.🔁 When does the else part run? (a) never (b) when if is true (c) always (d) when if is false
- 32.📝 Which input type hides what you type? (a) date (b) password (c) radio (d) email
- 33.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
-
34.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) index.html (c) Easy snacks (d) Class 7 Blog - 35.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 36.Which colour pair is easy to read? (a) blue on purple (b) red on green (c) white on dark blue (d) light grey on white
-
37.✍️ What value is given to font-style in this rule?
h1 {
font-style: italic;
background-color: yellow;
} (a) 20px (b) italic (c) red (d) font-style -
38.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 330px;
justify-content: space-between;
}
Inside are 4 boxes, each 60px wide (no margins). - 39.📊 Where do <td> cells go? (a) inside the <head> (b) inside a <li> (c) inside a <tr> (d) inside a <p>
-
40.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 160px;
justify-content: center;
}
Inside are 3 boxes, each 40px wide (no margins).
Answer key
- line 1
- 111111
- add CSS styles
- Cricket is fun.
- gives the page structure
- margin
- I love mangoes.
- dog.jpg
- True
- False
- as one space
- http
- True
- 3
- makes it harder
- 255
- 45
- Hot
- green
- index.html
- 40
- blue
- <h6>
- <td>
- a class selector
- 200
- 3
- console.log()
- a web server
- in a new tab
- when if is false
- password
- weak
- Class 7 Blog
- an opening tag
- white on dark blue
- italic
- 30
- inside a <tr>
- 20
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids