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 JavaScript word runs code when true? (a) let (b) alert() (c) if (d) console.log()
-
2.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h3>I love mangoes.</h3>
<p>My pets</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 3.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 4.🔁 Which loop repeats code a set number of times? (a) if (b) for (c) let (d) else
- 5.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the hr tag (d) the viewport meta tag
-
6.🔍 One closing tag is missing. Which one?
<p>I love mangoes.</p>
<i>Hello, world!
<h3>Rain today</h3> (a) </p> (b) </h3> (c) </i> (d) </em> -
7.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 8.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
- 9.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
- 10.Which colour pair is hard to read? (a) white on dark blue (b) dark grey on white (c) yellow on black (d) light grey on white
- 11.True or false: a web browser turns HTML into a page. (a) False (b) True
-
12.✍️ How many declarations (property: value pairs) are in this rule?
h1 {
border: 2px solid;
} - 13.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog - 15.Which of these is not safe to do online? (a) type a password on http (b) keep passwords secret (c) ask before downloading (d) use a strong password
- 16.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) plan what to show (c) add CSS styles (d) write the HTML
-
17.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 440px;
justify-content: center;
}
Inside are 4 boxes, each 100px wide (no margins). - 18.Which of these goes in the head? (a) <table> (b) <h1> (c) <title> (d) <img>
- 19.True or false: <ul> lists things in any order. (a) True (b) False
- 20.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
-
21.⚡ What does this code show?
let name = "Zoya";
alert("Well done, " + name + "!"); (a) name (b) Well done, name! (c) Zoya (d) Well done, Zoya! - 22.⚡ Which JavaScript word repeats code? (a) alert() (b) for (c) console.log() (d) let
- 23.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) plan what to show (b) add CSS styles (c) publish it online (d) test in a browser
- 24.🖌️ Which CSS property sets the letter colour? (a) background-color (b) color (c) font-size (d) font-weight
-
25.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) about.html (b) Play games (c) games.html (d) contact.html -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) The full moon (b) width (c) A happy dog (d) dog.jpg - 27.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
28.💬 How many paragraphs show on the page?
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> - 29.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
-
30.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Litchi</td><td>Papaya</td><td>Guava</td></tr>
<tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
</table> - 31.Which of these is the content? (a) space inside the border (b) the text or picture (c) the gap to other boxes (d) a solid or dotted edge
- 32.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 33.📊 In a table, which tag is a row? (a) <tr> (b) <th> (c) <td> (d) <tb>
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Litchi</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets -
35.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 28px;
}
} (a) Yes (b) No - 36.Which of these is true of <nav>? (a) holds copyright notes (b) is the page’s key part (c) holds extra side notes (d) helps you move around
- 37.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) write the HTML (c) publish it online (d) plan what to show
- 38.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
39.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 190px;
padding: 25px;
border: 4px solid black;
margin: 5px;
} - 40.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
Answer key
- if
- 2
- False
- for
- the viewport meta tag
- </i>
- 350
- <h4>
- element
- light grey on white
- True
- 1
- on the browser tab
- Birthday cake
- type a password on http
- plan what to show
- 20
- <title>
- True
- <nav>
- Well done, Zoya!
- for
- add CSS styles
- color
- games.html
- A happy dog
- True
- 2
- a code editor
- 3
- the text or picture
- a code editor
- <tr>
- bullets
- No
- helps you move around
- publish it online
- has a closing tag
- 258
- to leave notes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids