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 of these is margin? (a) space outside the border (b) the text or picture (c) the line round the box (d) the gap round content
- 2.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
-
3.🔁 What does this code print?
let temp = 49;
if (temp >= 28) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 4.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
- 5.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) script.js (c) style.css (d) notes.txt
-
6.🎯 Which CSS selector matches this element?
<li class="star" id="intro">Hello</li> (a) #intro (b) #main (c) .menu (d) .intro -
7.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) Rain today (b) Our school trip (c) Fun facts (d) My pets - 8.📊 Which tag makes a heading cell? (a) <tr> (b) <table> (c) <td> (d) <th>
- 9.Which of these is a closing tag? (a) <title> (b) <b> (c) <body> (d) </title>
-
10.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 150px;
padding: 15px;
border: 3px solid black;
margin: 10px;
} -
11.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Fun facts</p>
<p>Cricket is fun.</p>
<h2>I love mangoes.</h2> -
12.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Guava</td><td>Guava</td><td>Jamun</td></tr>
<tr><td>Jamun</td><td>Mango</td><td>Orange</td></tr>
<tr><td>Orange</td><td>Guava</td><td>Orange</td></tr>
</table> - 13.True or false: “tiny grey text” helps everyone use the page. (a) True (b) False
-
14.🔁 How many times does this code print “Hello”?
for (let i = 3; i < 6; i++) {
console.log("Hello");
} - 15.🌍 What finds the server for a domain name like example.com? (a) CSS (b) alt (c) DNS (d) HTML
-
16.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h2> → <h2> (a) Yes (b) No - 17.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
- 18.📝 Which input type lets you tick many? (a) radio (b) checkbox (c) text (d) password
- 19.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Colourful Site Styles (c) Cascading Style Sheets (d) Creative Sheet System
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 21.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
- 22.Which of these does HTML do? (a) sets colours and fonts (b) adds space around boxes (c) gives the page structure (d) shows a pop-up message
-
23.🌍 What is the path in this URL?
https://learn.example.com/about.html (a) learn.example.com (b) /maths/tables.html (c) https (d) /about.html -
24.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Banana</td><td>Orange</td><td>Grapes</td><td>Guava</td></tr>
<tr><td>Grapes</td><td>Jamun</td><td>Jamun</td><td>Grapes</td></tr>
</table> -
25.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Our school trip</p>
<p>Rain today</p> -
26.♿ Is this heading order correct (no level skipped)?
<h1> → <h3> → <h2> → <h3> (a) Yes (b) No -
27.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Hello, world!</p> -->
<p>My pets</p> - 28.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <h3/> (c) <\h3> (d) </h3>
-
29.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<p>Our school trip</p> - 30.True or false: HTML on its own cannot make headings. (a) False (b) True
- 31.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes a form box (c) makes headings and lists (d) adds space around boxes
- 32.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 33.🎨 A CSS file usually ends with which extension? (a) .html (b) .css (c) .js (d) .png
- 34.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h6>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
-
35.⚡ What does this code print? (Look at the quotes!)
let x = "1";
let y = 9;
console.log(x + y); (a) 10 (b) Error (c) 19 - 36.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
-
37.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p> - 38.True or false: HTML on its own can keep a high score. (a) True (b) False
-
39.🔍 One closing tag is missing. Which one?
<h1>My best friend</h1>
<p>I love mangoes.</p>
<em>Hello, world! (a) </em> (b) </u> (c) </p> (d) </h1> - 40.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
Answer key
- space outside the border
- not safe
- Hot
- src
- script.js
- #intro
- Our school trip
- <th>
- </title>
- 206
- 3
- 12
- False
- 3
- DNS
- Yes
- opens it in a new tab
- checkbox
- Cascading Style Sheets
- 255
- <li>
- gives the page structure
- /about.html
- 3
- 1
- No
- 1
- </h3>
- 3
- False
- adds space around boxes
- <!DOCTYPE html>
- .css
- <h6>
- 19
- <h5>
- 1
- False
- </em>
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids