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 attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
- 2.True or false: <h1> has a closing tag. (a) True (b) False
- 3.✍️ Which sign goes between a property and its value? (a) - (b) ; (c) = (d) :
- 4.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
5.🔁 How many times does this code print “Well done”?
for (let i = 1; i < 3; i++) {
console.log("Well done");
} - 6.True or false: <meta> is an empty tag. (a) True (b) False
- 7.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
- 8.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) for (c) if (d) console.log()
- 9.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 10.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Mouse (d) Markup
-
11.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>I love mangoes.</p>
<p>Fun facts</p>
<h2>Rain today</h2>
<h2>Cricket is fun.</h2> - 12.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) width (d) src
- 13.🔢 When you open a web page, which comes LAST? (a) the server sends files (b) you type the URL (c) the browser asks it (d) the browser shows it
-
14.🔁 How many times does this code print “Hello”?
for (let i = 1; i < 8; i++) {
console.log("Hello");
} -
15.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> --> (a) Fun facts (b) Our school trip (c) My best friend - 16.📱 min-width: 800px applies when the screen is ___. (a) 800px or wider (b) exactly 100px (c) 800px or narrower (d) turned off
-
17.⚖️ What colour is the text of this element?
<p class="red" id="hero">Hi</p>
CSS:
#hero { color: white; }
p { color: black; } (a) black (b) white (c) purple (d) blue -
18.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Rivers flow<br>Birds sing<br>Sky is blue</p> -
19.🔁 How many times does this code print “Hi”?
for (let i = 1; i <= 10; i++) {
console.log("Hi");
} -
20.⚡ What number does this code print?
let a = 34;
let b = 34;
console.log(a - b); -
21.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 9; i++) {
total = total + i;
}
console.log(total); - 22.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) ( (d) [
- 23.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 24.True or false: .menu is an id selector. (a) True (b) False
- 25.📊 Which tag makes one table row? (a) <th> (b) <td> (c) <table> (d) <tr>
-
26.📋 Does this list show bullets or numbers?
<ul>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
</ul> (a) numbers (b) bullets - 27.True or false: a code editor opens web pages for us. (a) False (b) True
-
28.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Grapes</td><td>Grapes</td><td>Mango</td></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Jamun</td></tr>
<tr><td>Grapes</td><td>Litchi</td><td>Grapes</td></tr>
</table> - 29.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the viewport meta tag (c) the br tag (d) the hr tag
-
30.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 7;
console.log(x + y); (a) 13 (b) Error (c) 67 - 31.✍️ Which sign ends each CSS declaration? (a) ; (b) . (c) , (d) :
- 32.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) align-items (c) display: flex (d) justify-content
- 33.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
-
34.⚖️ What colour is the text of this element?
<p class="menu" id="intro">Hi</p>
CSS:
#intro { color: red; }
#intro { color: black; } (a) red (b) blue (c) purple (d) black - 35.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h2>
- 36.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
-
37.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> -
38.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} (a) Yes (b) No -
39.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab -
40.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="text">
<input type="submit" value="Send">
</form>
Answer key
- alt
- True
- :
- <ol>
- 2
- True
- -->
- alert()
- a closing tag
- Markup
- 3
- alt
- the browser shows it
- 7
- My best friend
- 800px or wider
- white
- 5
- 10
- 0
- 45
- <
- <!DOCTYPE html>
- False
- <tr>
- bullets
- False
- 12
- the viewport meta tag
- 67
- ;
- align-items
- True
- black
- <h2>
- blue
- 2
- Yes
- in a new tab
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids