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.True or false: <ul> goes in the head. (a) True (b) False
-
2.⚖️ What colour is the text of this element?
<h2 class="red" id="logo">Hi</h2>
CSS:
.red { color: orange; }
.red { color: green; } (a) orange (b) purple (c) black (d) green -
3.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Papaya</td><td>Banana</td></tr>
<tr><td>Jamun</td><td>Guava</td></tr>
<tr><td>Papaya</td><td>Papaya</td></tr>
</table> - 4.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
- 5.🌍 Which one scrambles data on its way? (a) the browser (b) the server (c) the URL (d) HTTPS
- 6.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) </head> (c) <!DOCTYPE html> (d) <body>
- 7.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) script.js (c) index.html
- 8.🎨 Which tag holds CSS inside the head? (a) <css> (b) <script> (c) <style> (d) <body>
- 9.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
- 10.📝 Which input type hides what you type? (a) date (b) email (c) password (d) text
- 11.Which colour pair is easy to read? (a) red on green (b) white on black (c) yellow on white (d) pink on red
- 12.📱 What does a media query check? (a) the page title (b) the time of day (c) the screen width (d) the battery level
- 13.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
- 14.♿ What does good colour contrast mean? (a) no colours at all (b) text stands out clearly (c) only red text (d) many bright colours
- 15.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 16.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
- 17.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) : (d) -
- 18.🔢 In a basic web page file, which comes first: “</body>” or “<head>”? (a) </body> (b) <head>
- 19.Which of these is the border? (a) the text or picture (b) the line round the box (c) the gap round content (d) space outside the border
- 20.Which of these is padding? (a) space outside the border (b) a solid or dotted edge (c) space inside the border (d) the text or picture
- 21.Which of these is true of <nav>? (a) sits at the very top (b) holds copyright notes (c) holds the menu of links (d) holds the main content
-
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) width (b) kite.png (c) A red kite (d) Map of India - 23.True or false: <ol> lists steps in order. (a) False (b) True
-
24.🎯 Which CSS selector matches this element?
<span class="note" id="top">Hello</span> (a) .big (b) #intro (c) .top (d) #top - 25.🎯 Which element does the selector h2 style? (a) <h2 class="big"> (b) <span id="top"> (c) <li> (d) <div class="big">
- 26.True or false: <main> holds extra side notes. (a) True (b) False
-
27.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 170px;
justify-content: flex-end;
}
Inside are 3 boxes, each 40px wide (no margins). - 28.🎯 What kind of selector is #top? (a) a class selector (b) an element selector (c) an id selector
-
29.🔁 How many times does this code print “Well done”?
for (let i = 3; i <= 6; i++) {
console.log("Well done");
} -
30.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 7; i++) {
total = total + i;
}
console.log(total); - 31.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
- 32.True or false: to tell a trusted adult is safe. (a) False (b) True
- 33.True or false: a web server turns HTML into a page. (a) True (b) False
-
34.📊 How many rows does this table have?
<table>
<tr><td>Mango</td><td>Guava</td><td>Guava</td><td>Jamun</td></tr>
<tr><td>Orange</td><td>Guava</td><td>Grapes</td><td>Papaya</td></tr>
</table> - 35.True or false: <input type="date"> picks a day. (a) False (b) True
- 36.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
- 37.🔁 When does the else part run? (a) always (b) when if is false (c) never (d) when if is true
-
38.🔁 What is the LAST number this code prints?
for (let i = 0; i < 7; i = i + 4) {
console.log(i);
} -
39.🔍 One closing tag is missing. Which one?
<u>Our school trip</u>
<b>My pets</b>
<p>The red kite (a) </p> (b) </h3> (c) </b> (d) </u> - 40.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
Answer key
- False
- green
- 2
- href
- HTTPS
- <!DOCTYPE html>
- index.html
- <style>
- <li>
- password
- white on black
- the screen width
- index.html
- text stands out clearly
- -->
- </small>
- :
- <head>
- the line round the box
- space inside the border
- holds the menu of links
- A red kite
- True
- #top
- <h2 class="big">
- False
- 50
- an id selector
- 4
- 28
- <title>
- True
- False
- 2
- True
- to describe the image
- when if is false
- 4
- </p>
- <ol>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids