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.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 2.True or false: in <img>, alt is read by screen readers. (a) False (b) True
-
3.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h2> → <h2> (a) No (b) Yes - 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
- 5.🌗 Is black on white easy or hard to read? (a) easy to read (b) hard to read
-
6.✍️ What value is given to text-align in this rule?
h2 {
text-align: center;
padding: 8px;
} (a) text-align (b) yellow (c) center (d) 10px - 7.True or false: <td> gives the table a title. (a) True (b) False
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="200"> (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg -
9.⚡ What number does this code print?
let apples = 6;
apples = apples + 14;
apples = apples - 18;
console.log(apples); - 10.True or false: #end is a class selector. (a) False (b) True
-
11.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 190px;
padding: 30px;
border: 1px solid black;
margin: 10px;
} - 12.📱 What does a media query check? (a) the screen width (b) the time of day (c) the page title (d) the battery level
-
13.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Class 7 Blog (b) Thanks for visiting. (c) body (d) All about me - 14.True or false: <input type="email"> hides what you type. (a) False (b) True
- 15.🎯 Which element does the selector span style? (a) <span class="box"> (b) <h2 id="main"> (c) <p> (d) <h1 class="box">
- 16.⚡ Which JavaScript word repeats code? (a) console.log() (b) let (c) for (d) alert()
-
17.🎯 Which CSS selector matches this element?
<li class="big" id="main">Hello</li> (a) div (b) .red (c) #main (d) #logo -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="50"> (a) map.png (b) width (c) Map of India (d) Birthday cake - 19.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 20.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) test in a browser (b) write the HTML (c) publish it online (d) add CSS styles
- 21.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <p> (d) <input>
-
22.🔁 What does this code print?
let score = 28;
if (score > 15) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again -
23.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.net/news/today.html (a) No (b) Yes -
24.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> -
25.🔒 Is the connection to this address scrambled (encrypted)?
http://learn.example.com/games/chess.html (a) Yes (b) No - 26.🚀 Which file should this code go in: console.log(5 + 2); (a) style.css (b) script.js (c) index.html
- 27.🔍 Which is the odd one out? (a) adds space around boxes (b) lays out the page (c) makes a form box (d) sets colours and fonts
- 28.🧩 Which language makes a form box? (a) JavaScript (b) CSS (c) HTML
-
29.⚖️ What colour is the text of this element?
<h1 class="star" id="hero">Hi</h1>
CSS:
h1 { color: red; }
h1 { color: blue; } (a) red (b) blue (c) yellow (d) purple - 30.💪 Which flexbox property turns on flexbox? (a) gap (b) display: flex (c) justify-content (d) align-items
-
31.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 6;
console.log(x + y); (a) 9 (b) Error (c) 36 -
32.📊 How many cells does this table have in all?
<table>
<tr><td>Papaya</td><td>Orange</td></tr>
<tr><td>Jamun</td><td>Papaya</td></tr>
<tr><td>Papaya</td><td>Papaya</td></tr>
</table> -
33.📊 How many cells does this table have in all?
<table>
<tr><td>Orange</td><td>Papaya</td></tr>
<tr><td>Guava</td><td>Jamun</td></tr>
</table> -
34.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 600px) {
p {
font-size: 32px;
}
} -
35.⚡ What does this code print? (Look at the quotes!)
let x = "2";
let y = 8;
console.log(x + y); (a) Error (b) 28 (c) 10 -
36.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} - 37.🔐 Is 111111 a strong or a weak password? (a) strong (b) weak
-
38.✍️ What value is given to color in this rule?
body {
padding: 8px;
color: red;
font-weight: bold;
} (a) center (b) 20px (c) color (d) red - 39.🌗 Is white on dark blue easy or hard to read? (a) easy to read (b) hard to read
- 40.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
Answer key
- an opening tag
- True
- Yes
- 255
- easy to read
- center
- False
- An old fort
- 2
- False
- 272
- the screen width
- All about me
- False
- <span class="box">
- for
- #main
- Map of India
- in the head
- write the HTML
- <textarea>
- You win
- No
- 250
- No
- script.js
- makes a form box
- HTML
- blue
- display: flex
- 36
- 6
- 4
- 24
- 28
- 10
- weak
- red
- easy to read
- for
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids