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 input type sends the form? (a) text (b) date (c) submit (d) checkbox
- 2.True or false: in <img>, alt shows if the image fails. (a) True (b) False
-
3.🔁 What does this code print?
let marks = 11;
if (marks > 39) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Pass (b) Try again -
4.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 60px;
padding: 15px;
border: 2px solid black;
margin: 5px;
} - 5.True or false: a code editor is where we type code. (a) True (b) False
- 6.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
- 7.📝 Which input type lets you pick only one? (a) number (b) submit (c) email (d) radio
- 8.📱 What does a media query check? (a) the battery level (b) the screen width (c) the page title (d) the time of day
-
9.🖌️ What colour are the letters?
li {
color: red;
text-align: right;
font-size: 40px;
background-color: orange;
} (a) red (b) orange (c) black - 10.🧭 Which semantic tag holds the main content? (a) <article> (b) <header> (c) <main> (d) <footer>
- 11.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
-
12.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Rain today</h2>
<p>Good morning!</p>
<h2>My best friend</h2>
<h2>Hello, world!</h2> -
13.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 230px;
padding: 5px;
border: 1px solid black;
margin: 0px;
} -
14.🔗 Where does this link open?
<a href="art.html">Maths fun</a> (a) in the same tab (b) in a new tab - 15.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 16.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
-
17.🌍 What is the protocol in this URL?
http://www.example.net/about.html (a) http (b) /about.html (c) www.example.net (d) https - 18.🎯 Which sign starts an id selector? (a) & (b) @ (c) # (d) .
- 19.🌈 Which colour of light is strongest in rgb(189, 28, 44)? (a) red (b) green (c) blue
-
20.⚡ What number does this code print?
let a = 5;
let b = 4;
console.log(a * b); - 21.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
- 22.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
- 23.🚀 Which file should this code go in: alert(score); (a) script.js (b) style.css (c) index.html
-
24.🔁 What does this code print?
let temp = 6;
if (temp > 37) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 25.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 27.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
- 28.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
- 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 30.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 31.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
- 32.🎨 A CSS file usually ends with which extension? (a) .js (b) .html (c) .css (d) .png
-
33.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>Our school trip</p>
<p>My pets</p>
<p>I love mangoes.</p> - 34.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) white
- 35.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) style.css (c) index.html
- 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
37.🔁 What does this code print?
let temp = 38;
if (temp > 10) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot - 38.💬 Does the browser show comments on the page? (a) Yes (b) No
- 39.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <caption> (d) <tr>
- 40.🔁 Which word runs code only when something is true? (a) let (b) if (c) for (d) log
Answer key
- submit
- True
- Try again
- 104
- True
- .html
- radio
- the screen width
- red
- <main>
- Yes
- 4
- 242
- in the same tab
- a closing tag
- No
- http
- #
- red
- 20
- an element selector
- <img>
- script.js
- Cool
- in the head
- 3
- <h1>
- False
- F
- <ul>
- an id selector
- .css
- 4
- blue
- index.html
- <!DOCTYPE html>
- Hot
- No
- <caption>
- if
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids