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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Rivers flow</p> - 2.✍️ Which sign goes between a property and its value? (a) - (b) : (c) ; (d) =
-
3.📊 How many cells are in each row?
<table>
<tr><td>Litchi</td><td>Banana</td><td>Papaya</td></tr>
<tr><td>Banana</td><td>Banana</td><td>Jamun</td></tr>
<tr><td>Mango</td><td>Papaya</td><td>Orange</td></tr>
<tr><td>Grapes</td><td>Papaya</td><td>Litchi</td></tr>
</table> - 4.📦 In the box model, which part is space inside the border? (a) border (b) margin (c) content (d) padding
- 5.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
-
6.🔁 How many times does this code print “Welcome”?
for (let i = 0; i <= 8; i++) {
console.log("Welcome");
} - 7.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <body> (c) </head> (d) </html>
-
8.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 150px;
justify-content: flex-start;
}
Inside are 3 boxes, each 40px wide (no margins). - 9.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 10.What is <input type="submit"> for? (a) hides what you type (b) is for one line of words (c) sends the form (d) lets you pick only one
- 11.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 12.True or false: a web server turns HTML into a page. (a) True (b) False
- 13.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ffff00 (d) #ff00ff
-
14.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) href (b) art.html (c) Visit the site (d) Contact us -
15.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Sky is blue</p> - 16.📱 min-width: 800px applies when the screen is ___. (a) 800px or wider (b) turned off (c) exactly 100px (d) 800px or narrower
-
17.✍️ What is the selector in this CSS rule?
.note {
color: red;
margin: 10px;
} (a) color (b) .note (c) 10px (d) #top - 18.Which of these is margin? (a) the gap to other boxes (b) the text or picture (c) the gap round content (d) a solid or dotted edge
-
19.⚖️ What colour is the text of this element?
<p class="big" id="end">Hi</p>
CSS:
.big { color: green; }
#end { color: white; }
p { color: red; } (a) green (b) white (c) purple (d) red - 20.📦 In the box model, which part is the gap to other boxes? (a) content (b) padding (c) border (d) margin
- 21.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.🔁 What does this code print?
let temp = 33;
if (temp >= 43) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 23.Which of these is a closing tag? (a) <li> (b) <h1> (c) <p> (d) </h1>
-
24.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Rain today</h2>
<h4>Rain today</h4>
<h3>I love mangoes.</h3> - 25.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
- 26.🌍 Which one sends the page back? (a) the browser (b) the URL (c) the server (d) HTTPS
- 27.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) console.log() (d) for
-
28.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 290px;
padding: 5px;
border: 1px solid black;
margin: 10px;
} - 29.🎯 What kind of selector is #end? (a) a class selector (b) an element selector (c) an id selector
- 30.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
- 31.💪 Which flexbox property sets space between boxes? (a) align-items (b) display: flex (c) flex-direction (d) gap
- 32.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
- 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 34.True or false: in <img>, width tells which image to load. (a) True (b) False
-
35.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> -
36.🔍 Which line is missing its closing tag?
line 1: <h1>I love mangoes.</h1>
line 2: <em>The red kite</em>
line 3: <h2>Good morning! (a) line 2 (b) line 3 (c) line 1 -
37.🖌️ Where does the text sit on its line?
li {
text-align: left;
color: blue;
background-color: yellow;
font-size: 12px;
} (a) in the middle (b) on the right (c) on the left - 38.True or false: HTML on its own cannot make tables. (a) True (b) False
- 39.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
40.⚖️ What colour is the text of this element?
<p class="menu" id="intro">Hi</p>
CSS:
#intro { color: green; }
#intro { color: orange; } (a) green (b) black (c) orange (d) purple
Answer key
- 3
- :
- 3
- padding
- index.html
- 9
- </html>
- 30
- No
- sends the form
- an empty tag
- False
- #ff00ff
- Contact us
- 3
- 800px or wider
- .note
- the gap to other boxes
- white
- margin
- a closing tag
- Cool
- </h1>
- 4
- not safe
- the server
- for
- 302
- an id selector
- <h6>
- gap
- element
- to describe the image
- False
- 2
- line 3
- on the left
- False
- has a closing tag
- orange
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids