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.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 400px;
justify-content: center;
}
Inside are 3 boxes, each 100px wide (no margins). -
2.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) A happy dog (b) width (c) The full moon (d) dog.jpg - 3.Which of these is true of <header>? (a) holds extra side notes (b) sits at the bottom (c) holds one blog post (d) sits at the very top
-
4.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) maths.html (c) https://example.com (d) contact.html -
5.📊 How many cells does this table have in all?
<table>
<tr><td>Mango</td><td>Mango</td></tr>
<tr><td>Mango</td><td>Grapes</td></tr>
<tr><td>Jamun</td><td>Mango</td></tr>
<tr><td>Grapes</td><td>Grapes</td></tr>
</table> -
6.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 2;
console.log(x + y); (a) 5 (b) Error (c) 32 -
7.🎯 Which CSS selector matches this element?
<p class="big" id="end">Hello</p> (a) h1 (b) .end (c) #end (d) #big - 8.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) test in a browser (c) plan what to show (d) write the HTML
-
9.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p> (a) Rain today (b) I love mangoes. (c) My pets (d) Cricket is fun. - 10.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
11.📝 How many <input> tags are in this form?
<form>
<input type="email">
<input type="number">
<input type="checkbox">
<input type="text">
<input type="date">
<input type="submit" value="Send">
</form> - 12.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
-
13.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<p>The red kite</p> -
14.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 12px;
}
} (a) No (b) Yes - 15.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
- 16.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Cascading Style Sheets (d) Creative Sheet System
- 17.What does font-size do? (a) makes letters bigger (b) centres a heading (c) picks the font style (d) makes the text bold
-
18.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
color: red;
} -
19.⚖️ What colour is the text of this element?
<h1 class="note" id="top">Hi</h1>
CSS:
.note { color: blue; }
.note { color: orange; } (a) orange (b) green (c) blue (d) yellow - 20.True or false: CSS makes a form box. (a) True (b) False
- 21.True or false: padding is the gap round content. (a) True (b) False
-
22.✍️ What value is given to font-weight in this rule?
h1 {
font-weight: bold;
font-size: 20px;
} (a) bold (b) 300px (c) 2px solid (d) font-weight - 23.⚡ Which JavaScript word shows a pop-up box? (a) alert() (b) for (c) if (d) let
- 24.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
-
25.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Cricket Club (b) Planets (c) index.html (d) Mars is red. - 26.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) test in a browser (b) add CSS styles (c) write the HTML (d) publish it online
-
27.✍️ Which property is set to center in this rule?
li {
text-align: center;
color: red;
} (a) background-color (b) text-align (c) margin (d) center - 28.Which of these is a strong password? (a) Rain#Drop_42! (b) qwerty (c) abcd1234 (d) 111111
- 29.📝 Which input type sends the form? (a) number (b) email (c) text (d) submit
- 30.🧭 Is <article> semantic or not semantic? (a) semantic (b) not semantic
-
31.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<u>The red kite</u>
<h2>Fun facts (a) </b> (b) </h3> (c) </u> (d) </h2> - 32.Which of these is not safe to do online? (a) tell a trusted adult (b) log out on shared PCs (c) share your OTP (d) keep passwords secret
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 34.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
- 35.True or false: a web browser has an address bar. (a) True (b) False
- 36.True or false: <input type="password"> is for one line of words. (a) False (b) True
- 37.Which of these is safe to do online? (a) share your password (b) tell a trusted adult (c) post your home address (d) meet an online stranger
- 38.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
- 39.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 40.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
Answer key
- 50
- A happy dog
- sits at the very top
- contact.html
- 8
- 32
- #end
- plan what to show
- I love mangoes.
- href
- 6
- <a href="about.html">
- 3
- Yes
- to leave notes
- Cascading Style Sheets
- makes letters bigger
- 1
- orange
- False
- True
- bold
- alert()
- <h1>
- Cricket Club
- write the HTML
- text-align
- Rain#Drop_42!
- submit
- semantic
- </h2>
- share your OTP
- 350
- False
- True
- False
- tell a trusted adult
- an id selector
- a paragraph
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids