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 word runs code only when something is true? (a) log (b) let (c) for (d) if
- 2.True or false: <header> holds the logo and title. (a) True (b) False
- 3.🌈 Which colour is #00ffff? (a) cyan (b) black (c) bright green (d) magenta
- 4.⚡ What does alert() show? (a) a new tab (b) a picture (c) a pop-up box (d) a table
- 5.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 6.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
7.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>The red kite</p> - 8.True or false: <input type="date"> picks a day. (a) False (b) True
- 9.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h6> (c) <h2> (d) <h4>
-
10.🎯 Which CSS selector matches this element?
<h1 class="big" id="intro">Hello</h1> (a) .intro (b) #big (c) h1 (d) .red -
11.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 300px;
padding: 10px;
border: 1px solid black;
margin: 20px;
} - 12.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
- 13.📝 Which input type takes only numbers? (a) checkbox (b) password (c) text (d) number
- 14.⚡ Which JavaScript word makes a new variable? (a) alert() (b) console.log() (c) if (d) let
- 15.Which of these is safe to do online? (a) post your home address (b) ask before downloading (c) download from pop-ups (d) share your password
-
16.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Papaya</li>
<li>Mango</li>
<li>Orange</li>
<li>Jamun</li>
<li>Litchi</li>
</ol> -
17.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) news.html (b) Maths fun (c) Art corner (d) href - 18.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
- 19.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
- 20.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
-
21.📋 What number does the browser show next to “Guava”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Guava</li>
<li>Banana</li>
<li>Grapes</li>
</ol> - 22.True or false: in <img>, src tells which image to load. (a) True (b) False
- 23.📝 Which input type is for an email address? (a) text (b) checkbox (c) email (d) radio
-
24.🎯 Which CSS selector matches this element?
<div class="note" id="main">Hello</div> (a) #main (b) #logo (c) .big (d) #note - 25.True or false: the server sends the page back. (a) False (b) True
-
26.🔁 What does this code print?
let age = 24;
if (age > 39) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 27.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 28.🎯 Which sign starts a class selector? (a) # (b) @ (c) . (d) &
-
29.🔍 Which line is missing its closing tag?
line 1: <h2>Fun facts
line 2: <p>Hello, world!</p>
line 3: <strong>Rain today</strong> (a) line 3 (b) line 1 (c) line 2 -
30.♿ Is this heading order correct (no level skipped)?
<h1> → <h1> → <h1> → <h1> (a) No (b) Yes -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width - 32.🧩 Which language rounds box corners? (a) HTML (b) JavaScript (c) CSS
- 33.True or false: <input type="checkbox"> lets you tick many. (a) True (b) False
- 34.🔢 When you open a web page, what comes right after “DNS finds the server”? (a) the browser shows it (b) you type the URL (c) the browser asks it (d) the server sends files
-
35.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Fun facts</h2>
<h2>Fun facts</h2>
<p>The red kite</p>
<p>My best friend</p>
<h2>I love mangoes.</h2> - 36.Which of these has a closing tag? (a) <ul> (b) <meta> (c) <br> (d) <input>
-
37.⚡ What does this code print? (Look at the quotes!)
let x = "1";
let y = 7;
console.log(x + y); (a) 17 (b) Error (c) 8 -
38.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> -
39.⚡ What does this code show?
let name = "Riya";
alert("Well done, " + name + "!"); (a) name (b) Well done, name! (c) Well done, Riya! (d) Riya -
40.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 180px;
justify-content: flex-end;
}
Inside are 4 boxes, each 40px wide (no margins).
Answer key
- if
- True
- cyan
- a pop-up box
- href
- in the body
- 2
- True
- <h6>
- h1
- 322
- False
- number
- let
- ask before downloading
- 4
- Maths fun
- the later one
- element
- Yes
- 3
- True
- #main
- True
- child
- in the head
- .
- line 1
- Yes
- Birthday cake
- CSS
- True
- the browser asks it
- 3
- <ul>
- 17
- 300
- Well done, Riya!
- 20
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids