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: the browser shows the page to you. (a) False (b) True
- 2.🎨 Which attribute adds CSS inside one tag? (a) src (b) href (c) style (d) alt
-
3.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<p>I love mangoes.</p> -
4.🔗 Where does this link open?
<a href="quiz.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 5.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <p> (c) </p> (d) <\p>
- 6.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
- 7.🔍 Which is the odd one out? (a) counts down a timer (b) reacts to a button click (c) shows a pop-up message (d) adds space around boxes
-
8.✍️ What value is given to font-size in this rule?
body {
font-weight: bold;
margin: 10px;
background-color: yellow;
font-size: 20px;
} (a) center (b) font-size (c) 20px (d) yellow - 9.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the title (d) the doctype
- 10.📝 Which input type sends the form? (a) email (b) submit (c) date (d) checkbox
- 11.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
- 12.Which of these is safe to do online? (a) think before you post (b) share your password (c) download from pop-ups (d) put secrets in comments
- 13.True or false: body is a class selector. (a) True (b) False
-
14.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 28px;
}
} - 15.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 16.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
17.📊 How many cells does this table have in all?
<table>
<tr><td>Litchi</td><td>Jamun</td></tr>
<tr><td>Grapes</td><td>Banana</td></tr>
<tr><td>Jamun</td><td>Jamun</td></tr>
</table> - 18.📄 Can HTML on its own run a game loop? (a) No (b) Yes
-
19.⚡ What number does this code print?
let marks = 27;
marks = marks + 7;
marks = marks - 18;
console.log(marks); - 20.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
-
21.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 1024px) {
p {
font-size: 22px;
}
} (a) Yes (b) No -
22.🌍 What is the domain name in this URL?
https://www.example.com/art/gallery.html (a) kids.example.org (b) /art/gallery.html (c) https (d) www.example.com - 23.Which of these has a closing tag? (a) <li> (b) <input> (c) <img> (d) <meta>
-
24.🔁 How many numbers does this code print?
for (let i = 0; i < 17; i = i + 2) {
console.log(i);
} - 25.📦 In the box model, which part is the gap round content? (a) content (b) margin (c) border (d) padding
-
26.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) news.html (b) Maths fun (c) art.html (d) maths.html - 27.🌈 Which colour of light is strongest in rgb(245, 52, 51)? (a) blue (b) green (c) red
- 28.What is <input type="text"> for? (a) is for an email address (b) hides what you type (c) lets you pick only one (d) is for one line of words
- 29.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
-
30.🔗 Where does this link open?
<a href="art.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 31.⚡ Which JavaScript word runs code when true? (a) alert() (b) console.log() (c) let (d) if
- 32.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <p>
-
33.🔍 Which line is missing its closing tag?
line 1: <b>Good morning!
line 2: <em>My pets</em>
line 3: <small>The red kite</small> (a) line 3 (b) line 1 (c) line 2 - 34.🖌️ Which CSS property picks the font style? (a) text-align (b) color (c) background-color (d) font-family
-
35.⚡ What does this code print? (Look at the quotes!)
let x = "5";
let y = 7;
console.log(x + y); (a) Error (b) 57 (c) 12 -
36.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Stars shine<br>Rivers flow<br>Roses are red</p> - 37.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <tr> (c) inside a <li> (d) inside the <head>
-
38.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in the same tab (b) in a new tab -
39.🔁 What does this code print?
let temp = 15;
if (temp < 35) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 40.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
Answer key
- True
- style
- 2
- in a new tab
- </p>
- makes it harder
- adds space around boxes
- 20px
- the body
- submit
- for
- think before you post
- False
- 28
- 1
- in the head
- 6
- No
- 16
- to describe the image
- No
- www.example.com
- <li>
- 9
- padding
- maths.html
- red
- is for one line of words
- blue
- in a new tab
- if
- <p>
- line 1
- font-family
- 57
- 5
- inside a <tr>
- in the same tab
- Hot
- <h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids