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.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 5; i++) {
total = total + 4;
}
console.log(total); - 2.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
- 3.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
-
4.✍️ Which property is set to 300px in this rule?
body {
text-align: center;
width: 300px;
margin: 10px;
} (a) color (b) width (c) font-style (d) 300px - 5.🧩 Which language reacts to a button click? (a) HTML (b) JavaScript (c) CSS
- 6.🎯 What kind of selector is body? (a) a class selector (b) an element selector (c) an id selector
- 7.True or false: JavaScript reacts to a button click. (a) False (b) True
- 8.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
- 9.🚀 Which file should this code go in: let score = 0; (a) style.css (b) index.html (c) script.js
- 10.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) : (d) -
- 11.📝 Which input type is for an email address? (a) number (b) password (c) submit (d) email
- 12.Which of these is margin? (a) space inside the border (b) the gap to other boxes (c) the line round the box (d) a solid or dotted edge
- 13.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
-
14.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) https://example.com (b) About us (c) maths.html (d) art.html -
15.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Mango</li>
</ol> - 16.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) switch off the PC (c) delete the file (d) rename the folder
- 17.🔐 Is riya2014 a strong or a weak password? (a) strong (b) weak
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
-
19.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>Rain today</p> (a) Cricket is fun. (b) Fun facts (c) My best friend (d) Rain today - 20.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <header> (b) <nav> (c) <footer> (d) <main>
-
21.🔁 How many times does this code print “Welcome”?
for (let i = 2; i <= 9; i++) {
console.log("Welcome");
} -
22.🔗 Where does this link open?
<a href="https://example.com">Play games</a> (a) in the same tab (b) in a new tab - 23.What does font-size do? (a) sets the letter colour (b) centres a heading (c) makes letters bigger (d) colours behind the text
- 24.True or false: #end is an element selector. (a) False (b) True
- 25.True or false: margin is the text or picture. (a) True (b) False
- 26.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
- 27.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) nobody (d) only the printer
-
28.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) https://example.com (b) href (c) Maths fun (d) Art corner -
29.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 270px;
padding: 15px;
border: 4px solid black;
margin: 10px;
} - 30.Which of these is a closing tag? (a) <title> (b) <li> (c) <h1> (d) </body>
- 31.Which of these is not safe to do online? (a) share your password (b) use a nickname in games (c) ask before downloading (d) check for https first
- 32.Which of these does JavaScript do? (a) lays out the page (b) sets colours and fonts (c) reacts to a button click (d) makes a form box
-
33.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 30px;
}
} - 34.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
- 35.🌈 Which colour is #ffff00? (a) magenta (b) black (c) white (d) yellow
- 36.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) close it, tell an adult (c) type the password (d) share it with friends
-
37.📊 How many cells does this table have in all?
<table>
<tr><td>Orange</td><td>Grapes</td></tr>
<tr><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Orange</td><td>Grapes</td></tr>
<tr><td>Mango</td><td>Guava</td></tr>
</table> -
38.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 3;
}
console.log(total); - 39.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h4> or <h1>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
- 40.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
Answer key
- 20
- a web browser
- helps everyone
- width
- JavaScript
- an element selector
- True
- the body
- script.js
- :
- the gap to other boxes
- <ol>
- https://example.com
- 2
- save and refresh
- weak
- F
- Fun facts
- <header>
- 8
- in the same tab
- makes letters bigger
- False
- False
- <img>
- screen-reader users
- Maths fun
- 308
- </body>
- share your password
- reacts to a button click
- 24
- the viewport meta tag
- yellow
- close it, tell an adult
- 8
- 12
- <h1>
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids