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 list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
-
2.🎯 Which CSS selector matches this element?
<h1 class="menu" id="hero">Hello</h1> (a) .note (b) h1 (c) #menu (d) h2 - 3.Which of these is true of <nav>? (a) sits at the bottom (b) helps you move around (c) holds copyright notes (d) sits at the very top
- 4.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) - (d) :
-
5.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 8px;
}
} (a) No (b) Yes - 6.📝 What does <hr> draw? (a) a picture (b) a link (c) a table (d) a line across the page
- 7.True or false: <input type="radio"> hides what you type. (a) False (b) True
- 8.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
-
9.⚡ What does this code show?
let name = "Kabir";
alert("Hello, " + name + "!"); (a) name (b) Hello, Kabir! (c) Hello, name! (d) Kabir -
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Kites fly high<br>Sky is blue</p> -
11.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 480px) {
p {
font-size: 24px;
}
} (a) No (b) Yes -
12.⚡ What does this code show?
let name = "Riya";
console.log("Hello, " + name + "!"); (a) Hello, name! (b) Riya (c) Hello, Riya! (d) name -
13.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Papaya</td></tr>
<tr><td>Guava</td><td>Guava</td></tr>
</table> - 14.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 15.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
-
16.⚡ What does this code show?
let name = "Zoya";
alert("Hello, " + name + "!"); (a) Hello, name! (b) Zoya (c) Hello, Zoya! (d) name -
17.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My best friend</p>
<p>Our school trip</p>
<h4>Our school trip</h4>
<p>Fun facts</p> -
18.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 480px) {
p {
font-size: 18px;
}
} (a) Yes (b) No -
19.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="password">
<input type="submit" value="Send">
</form> - 20.🔁 Which loop repeats code a set number of times? (a) let (b) for (c) if (d) else
-
21.🌍 What is the path in this URL?
http://kids.example.org/news/today.html (a) http (b) kids.example.org (c) /games/chess.html (d) /news/today.html - 22.⚡ What does alert() show? (a) a new tab (b) a table (c) a picture (d) a pop-up box
-
23.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) games.html (c) Contact us (d) href -
24.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h2> → <h2> (a) Yes (b) No - 25.True or false: a web server sends pages over the net. (a) True (b) False
-
26.🔍 Which line is missing its closing tag?
line 1: <u>My best friend</u>
line 2: <h1>Cricket is fun.
line 3: <i>Our school trip</i> (a) line 2 (b) line 1 (c) line 3 - 27.🎯 Which element does the selector #top style? (a) <p class="top"> (b) <p id="top"> (c) <h1 class="note"> (d) <p id="intro">
-
28.⚡ What does this code show?
let name = "Meera";
alert("Hello, " + name + "!"); (a) Meera (b) Hello, name! (c) Hello, Meera! (d) name -
29.⚖️ What colour is the text of this element?
<p class="star" id="logo">Hi</p>
CSS:
#logo { color: yellow; }
#logo { color: purple; } (a) orange (b) black (c) yellow (d) purple -
30.🔗 Where does this link open?
<a href="games.html">Maths fun</a> (a) in the same tab (b) in a new tab -
31.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Rain today</p>
<p>Good morning!</p>
<p>I love mangoes.</p> - 32.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) yellow (c) white (d) bright green
- 33.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
- 34.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <\em> (c) </em> (d) <em>
-
35.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 150px;
justify-content: flex-start;
}
Inside are 2 boxes, each 60px wide (no margins). -
36.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>My pets</p> -
37.🖌️ What colour are the letters?
h2 {
font-size: 20px;
text-align: center;
background-color: blue;
color: red;
} (a) red (b) black (c) blue - 38.🎯 Which element does the selector h2 style? (a) <div class="note"> (b) <span id="logo"> (c) <li> (d) <h2 class="note">
- 39.True or false: HTML on its own can show paragraphs. (a) True (b) False
- 40.🎨 What does CSS stand for? (a) Creative Sheet System (b) Colourful Site Styles (c) Computer Style Sheets (d) Cascading Style Sheets
Answer key
- <ol>
- h1
- helps you move around
- :
- Yes
- a line across the page
- False
- to describe the image
- Hello, Kabir!
- 4
- Yes
- Hello, Riya!
- 3
- an opening tag
- in the body
- Hello, Zoya!
- 2
- No
- 3
- for
- /news/today.html
- a pop-up box
- Contact us
- Yes
- True
- line 2
- <p id="top">
- Hello, Meera!
- purple
- in the same tab
- 4
- white
- <h1>
- </em>
- 30
- 3
- red
- <h2 class="note">
- True
- Cascading Style Sheets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids