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 browser opens web pages for us. (a) True (b) False
-
2.🔁 What does this code print?
let age = 7;
if (age < 15) {
console.log("teen");
} else {
console.log("child");
} (a) child (b) teen - 3.True or false: to tell a trusted adult is not safe. (a) False (b) True
-
4.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 90px;
padding: 20px;
border: 1px solid black;
margin: 5px;
} - 5.📊 Which tag gives the table a title? (a) <tr> (b) <table> (c) <td> (d) <caption>
- 6.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tr> (d) <tb>
-
7.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
</ul> - 8.🌈 Which hex code is blue? (a) #000000 (b) #ffffff (c) #0000ff (d) #ffff00
- 9.Which of these is true of <article>? (a) is the page’s key part (b) holds the logo and title (c) holds the main content (d) holds one blog post
-
10.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg - 11.📊 Which tag makes one table row? (a) <table> (b) <tr> (c) <th> (d) <td>
- 12.🔁 Which loop repeats code a set number of times? (a) let (b) if (c) else (d) for
-
13.⚖️ What colour is the text of this element?
<h2 class="menu" id="logo">Hi</h2>
CSS:
.menu { color: red; }
.menu { color: green; } (a) black (b) green (c) blue (d) red - 14.True or false: HTML gives the page structure. (a) False (b) True
-
15.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 110px;
justify-content: space-between;
}
Inside are 2 boxes, each 40px wide (no margins). - 16.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
- 17.🧭 Which semantic tag holds the main content? (a) <aside> (b) <footer> (c) <main> (d) <article>
- 18.True or false: <ul><li>Art</li></ul> goes in script.js. (a) True (b) False
- 19.🔍 Which is the odd one out? (a) reacts to a button click (b) shows a pop-up message (c) counts down a timer (d) sets colours and fonts
- 20.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h5>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
-
21.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>My best friend</p> (a) Hello, world! (b) The red kite (c) Rain today (d) My best friend - 22.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows pages from the web (d) colours code to help us
-
23.🖌️ What colour are the letters?
h2 {
font-size: 16px;
background-color: white;
text-align: center;
color: blue;
} (a) green (b) white (c) blue -
24.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h4> → <h4> (a) No (b) Yes - 25.True or false: padding is the line round the box. (a) False (b) True
-
26.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<p>The red kite</p> (a) Hello, world! (b) My pets (c) The red kite -
27.🌍 What is the protocol in this URL?
https://www.example.com/news/today.html (a) http (b) www.example.com (c) /news/today.html (d) https - 28.✍️ CSS declarations go inside which brackets? (a) < > (b) ( ) (c) [ ] (d) { }
-
29.🔗 Where does this link open?
<a href="maths.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 30.What does font-family do? (a) colours behind the text (b) sets the letter colour (c) makes the text bold (d) picks the font style
- 31.🧭 Is <section> semantic or not semantic? (a) semantic (b) not semantic
- 32.🔢 When you open a web page, which comes first: “DNS finds the server” or “you type the URL”? (a) you type the URL (b) DNS finds the server
-
33.🔁 What does this code print?
let score = 6;
if (score > 9) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 34.Which of these has a closing tag? (a) <hr> (b) <b> (c) <input> (d) <img>
- 35.🔢 To build and share your first web page, which comes LAST? (a) add CSS styles (b) test in a browser (c) write the HTML (d) publish it online
- 36.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 37.📝 What does a password box show instead of letters? (a) numbers (b) capital letters (c) emojis (d) dots
- 38.🚀 Which tag loads script.js into a page? (a) <js src="script.js"> (b) <link script.js> (c) <a href="script.js"> (d) <script src="script.js">
- 39.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) cyan
- 40.📦 In the box model, which part is space inside the border? (a) padding (b) margin (c) content (d) border
Answer key
- True
- teen
- False
- 132
- <caption>
- <tr>
- 2
- #0000ff
- holds one blog post
- bus.jpg
- <tr>
- for
- green
- True
- 30
- <a>
- <main>
- False
- sets colours and fonts
- <h2>
- The red kite
- shows pages from the web
- blue
- No
- False
- My pets
- https
- { }
- in a new tab
- picks the font style
- semantic
- you type the URL
- Play again
- <b>
- publish it online
- No
- dots
- <script src="script.js">
- bright green
- padding
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids