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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="150"> (a) width (b) fort.jpg (c) A tiger asleep (d) An old fort - 2.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) red (d) black
- 4.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) plan what to show (c) publish it online (d) add CSS styles
-
5.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>The red kite</p> (a) The red kite (b) My pets (c) Hello, world! (d) I love mangoes. - 6.🔢 To build and share your first web page, which comes first: “plan what to show” or “add CSS styles”? (a) plan what to show (b) add CSS styles
-
7.✍️ How many declarations (property: value pairs) are in this rule?
.note {
margin: 10px;
color: red;
font-size: 20px;
} - 8.Which of these is safe to do online? (a) share your password (b) put secrets in comments (c) type a password on http (d) use a nickname in games
-
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Space Facts (b) body (c) Welcome! (d) We won by 5 runs. -
10.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 250px;
justify-content: space-between;
}
Inside are 4 boxes, each 40px wide (no margins). - 11.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
- 12.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
- 13.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) justify-content (d) gap
-
14.🔍 Which line is missing its closing tag?
line 1: <small>Good morning!</small>
line 2: <h1>Fun facts</h1>
line 3: <h3>I love mangoes. (a) line 2 (b) line 1 (c) line 3 - 15.What does justify-content: space-between do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the end (d) packs boxes at the start
- 16.💬 Does the browser show comments on the page? (a) No (b) Yes
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
18.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Jamun</td></tr>
<tr><td>Litchi</td><td>Guava</td></tr>
<tr><td>Papaya</td><td>Grapes</td></tr>
</table> - 19.True or false: <tr> holds the whole table. (a) True (b) False
- 20.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
- 21.True or false: JavaScript makes headings and lists. (a) False (b) True
- 22.🚀 Which file is best for the colours and fonts? (a) index.html (b) style.css (c) photo.jpg (d) script.js
- 23.True or false: HTML makes a link. (a) True (b) False
- 24.True or false: JavaScript changes the text size. (a) False (b) True
-
25.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>The red kite</p> (a) The red kite (b) Our school trip (c) Rain today - 26.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) space-between (c) flex-start (d) center
- 27.True or false: <li> has a closing tag. (a) True (b) False
- 28.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the first one (d) the shorter one
-
29.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 600px) {
p {
font-size: 24px;
}
} - 30.🔁 Which loop repeats code a set number of times? (a) if (b) else (c) for (d) let
- 31.True or false: HTML on its own can add up two numbers. (a) False (b) True
- 32.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
- 33.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <a> (d) <table>
- 34.🧭 Is <span> semantic or not semantic? (a) semantic (b) not semantic
-
35.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 10px;
}
} (a) No (b) Yes -
36.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Papaya</td><td>Grapes</td><td>Orange</td></tr>
<tr><td>Papaya</td><td>Grapes</td><td>Jamun</td></tr>
</table> -
37.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!</strong>
line 2: <h1>Hello, world!</h1>
line 3: <h2>Rain today (a) line 2 (b) line 3 (c) line 1 -
38.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 5; i++) {
total = total + 6;
}
console.log(total); -
39.📋 What number does the browser show next to “Mango”?
<ol start="5">
<li>Grapes</li>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 40.True or false: <p> has a closing tag. (a) False (b) True
Answer key
- An old fort
- <h6>
- blue
- publish it online
- I love mangoes.
- plan what to show
- 3
- use a nickname in games
- Welcome!
- 30
- 175
- <!--
- justify-content
- line 3
- equal gaps, none at ends
- No
- 200
- 4
- False
- the viewport meta tag
- False
- style.css
- True
- False
- Rain today
- flex-start
- True
- the later one
- 24
- for
- False
- <h1>
- <link rel="stylesheet">
- not semantic
- No
- 9
- line 3
- 30
- 7
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids