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.🖌️ Where does the text sit on its line?
h1 {
background-color: red;
text-align: left;
color: yellow;
font-size: 24px;
} (a) on the left (b) in the middle (c) on the right -
2.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Hello, world!</p>
<p>Good morning!</p> (a) Fun facts (b) Hello, world! (c) Good morning! (d) My pets - 3.Which of these is true of a web server? (a) shows pages from the web (b) turns HTML into a page (c) hosts websites online (d) shows line numbers
-
4.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My pets</p>
<h2>Rain today</h2>
<h2>The red kite</h2>
<h2>Good morning!</h2>
<p>I love mangoes.</p> -
5.🔁 How many times does this code print “Well done”?
for (let i = 0; i <= 9; i++) {
console.log("Well done");
} - 6.🚀 Which tag loads script.js into a page? (a) <script src="script.js"> (b) <link script.js> (c) <js src="script.js"> (d) <a href="script.js">
- 7.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
-
8.🌍 What is the domain name in this URL?
https://kids.example.org/maths/tables.html (a) /maths/tables.html (b) school.example.in (c) https (d) kids.example.org - 9.True or false: <footer> sits at the bottom. (a) True (b) False
- 10.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
-
11.🌍 What is the domain name in this URL?
https://kids.example.org/about.html (a) https (b) /about.html (c) school.example.in (d) kids.example.org -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) map.png (b) width (c) Birthday cake (d) Map of India -
13.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>My pets</p> (a) My pets (b) The red kite (c) Our school trip -
14.⚡ What number does this code print?
let a = 4;
let b = 3;
console.log(a * b); - 15.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
- 16.True or false: to download from pop-ups is safe. (a) True (b) False
-
17.✍️ How many declarations (property: value pairs) are in this rule?
h2 {
padding: 8px;
color: red;
} -
18.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/maths/tables.html (a) Yes (b) No -
19.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ul> - 20.🧩 Which language sets colours and fonts? (a) JavaScript (b) CSS (c) HTML
- 21.True or false: <input type="password"> lets you pick only one. (a) True (b) False
-
22.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) contact.html (b) Art corner (c) about.html (d) https://example.com - 23.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) align-items (c) justify-content (d) display: flex
- 24.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 25.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
-
26.📄 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>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Try this poha. (c) Class 7 Blog (d) index.html -
27.✍️ Which property is set to 8px in this rule?
.box {
padding: 8px;
background-color: yellow;
font-size: 20px;
} (a) font-weight (b) border (c) padding (d) 8px - 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 29.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
-
30.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Jamun</td></tr>
<tr><td>Grapes</td><td>Guava</td></tr>
<tr><td>Jamun</td><td>Papaya</td></tr>
</table> - 31.Which of these is padding? (a) the line round the box (b) a solid or dotted edge (c) the gap round content (d) space outside the border
-
32.📊 How many cells does this table have in all?
<table>
<tr><td>Litchi</td><td>Mango</td><td>Jamun</td></tr>
<tr><td>Grapes</td><td>Orange</td><td>Banana</td></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Mango</td></tr>
</table> -
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Fun facts</p>
<h3>I love mangoes.</h3>
<p>The red kite</p>
<h3>Fun facts</h3> -
34.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Orange</td><td>Mango</td><td>Litchi</td></tr>
</table> - 35.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 36.🔁 What does i++ do? (a) adds 1 to i (b) doubles i (c) prints i (d) takes 1 from i
- 37.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ffff00
- 38.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <code> (d) <js>
- 39.Which of these is the border? (a) space inside the border (b) the gap to other boxes (c) the text or picture (d) a solid or dotted edge
-
40.⚖️ What colour is the text of this element?
<h2 class="note" id="top">Hi</h2>
CSS:
#top { color: red; }
#top { color: yellow; } (a) red (b) green (c) yellow (d) blue
Answer key
- on the left
- My pets
- hosts websites online
- 3
- 10
- <script src="script.js">
- <h6>
- kids.example.org
- True
- Yes
- kids.example.org
- Map of India
- The red kite
- 12
- <html>
- False
- 2
- Yes
- 5
- CSS
- False
- about.html
- align-items
- False
- <h6>
- Class 7 Blog
- padding
- No
- a code editor
- 2
- the gap round content
- 9
- 3
- 6
- to leave notes
- adds 1 to i
- #0000ff
- <script>
- a solid or dotted edge
- yellow
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids