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: a web server opens web pages for us. (a) False (b) True
-
2.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 130px;
padding: 30px;
border: 3px solid black;
margin: 5px;
} - 3.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) style.css (c) script.js (d) notes.txt
-
4.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 310px;
justify-content: flex-end;
}
Inside are 4 boxes, each 60px wide (no margins). -
5.⚡ What does this code show?
let name = "Riya";
console.log("Well done, " + name + "!"); (a) Well done, Riya! (b) name (c) Riya (d) Well done, name! -
6.⚖️ What colour is the text of this element?
<h2 class="red" id="logo">Hi</h2>
CSS:
#logo { color: white; }
#logo { color: green; } (a) white (b) purple (c) orange (d) green - 7.✍️ Which sign ends each CSS declaration? (a) : (b) ; (c) . (d) ,
-
8.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Kabaddi
<input type="radio" name="sport"> Chess
<input type="radio" name="sport"> Hockey
<input type="radio" name="sport"> Cricket
</form> - 9.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
-
10.🔁 What does this code print?
let score = 22;
if (score < 29) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 11.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
- 12.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
- 13.Which of these is a strong password? (a) Chai$Cup_19x (b) abcd1234 (c) 123456 (d) password
- 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 15.🔍 Which is the odd one out? (a) makes a link (b) changes the page live (c) gives the page structure (d) makes headings and lists
- 16.Which of these is true of a web server? (a) shows line numbers (b) sends pages over the net (c) opens web pages for us (d) shows pages from the web
-
17.⚡ What does this code show?
let name = "Riya";
alert("Hello, " + name + "!"); (a) name (b) Riya (c) Hello, name! (d) Hello, Riya! -
18.🔁 What is the LAST number this code prints?
for (let i = 0; i < 8; i = i + 4) {
console.log(i);
} - 19.🖌️ Which CSS property colours behind the text? (a) background-color (b) text-align (c) font-size (d) color
- 20.True or false: .big is a class selector. (a) True (b) False
- 21.What is <input type="text"> for? (a) sends the form (b) takes only numbers (c) lets you pick only one (d) is for one line of words
- 22.🧭 Which semantic tag helps you move around? (a) <header> (b) <aside> (c) <nav> (d) <footer>
- 23.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
24.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 16px;
}
} (a) Yes (b) No - 25.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 26.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
-
27.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Rain today</p>
<p>The red kite</p> - 28.🔢 To build and share your first web page, which comes first: “add CSS styles” or “test in a browser”? (a) test in a browser (b) add CSS styles
-
29.✍️ What value is given to margin in this rule?
li {
margin: 10px;
background-color: yellow;
color: red;
} (a) bold (b) 8px (c) 10px (d) margin - 30.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
-
31.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>My pets</h4>
<h2>The red kite</h2>
<h2>Fun facts</h2> - 32.Which of these is true of <header>? (a) holds copyright notes (b) helps you move around (c) sits at the very top (d) holds a news story
- 33.Which of these is an opening tag? (a) </b> (b) </p> (c) </h1> (d) <p>
- 34.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
- 35.Which colour pair is hard to read? (a) black on white (b) yellow on black (c) dark grey on white (d) yellow on white
- 36.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
37.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Guava</li>
</ul> -
38.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Mango</td><td>Grapes</td><td>Litchi</td></tr>
<tr><td>Grapes</td><td>Guava</td><td>Mango</td></tr>
<tr><td>Orange</td><td>Banana</td><td>Orange</td></tr>
</table> - 39.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) < (d) [
-
40.⚖️ What colour is the text of this element?
<h2 class="big" id="logo">Hi</h2>
CSS:
#logo { color: blue; }
#logo { color: purple; } (a) black (b) green (c) blue (d) purple
Answer key
- False
- 196
- script.js
- 70
- Well done, Riya!
- green
- ;
- 1
- <li>
- You win
- hard to read
- write the HTML
- Chai$Cup_19x
- No
- changes the page live
- sends pages over the net
- Hello, Riya!
- 4
- background-color
- True
- is for one line of words
- <nav>
- No
- Yes
- 1
- src
- 3
- add CSS styles
- 10px
- a line across the page
- 4
- sits at the very top
- <p>
- <html>
- yellow on white
- Yes
- 2
- 12
- <
- purple
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids