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.✍️ How many declarations (property: value pairs) are in this rule?
.note {
margin: 10px;
width: 300px;
border: 2px solid;
} - 2.🎯 What kind of selector is p? (a) an id selector (b) a class selector (c) an element selector
- 3.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 4.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) screen-reader users (d) nobody
-
5.🖌️ What colour are the letters?
p {
text-align: right;
background-color: orange;
font-size: 20px;
color: green;
} (a) blue (b) green (c) orange -
6.🖌️ How big is the text, in px?
p {
background-color: white;
text-align: right;
font-size: 16px;
color: blue;
} - 7.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or wider (c) 600px or narrower (d) turned off
- 8.📦 In the box model, which part is the line round the box? (a) content (b) margin (c) border (d) padding
-
9.🔗 Which address opens when you click this link?
<a href="maths.html">Play games</a> (a) art.html (b) Play games (c) maths.html (d) news.html - 10.True or false: <input type="password"> lets you tick many. (a) True (b) False
- 11.📊 Which tag gives the table a title? (a) <table> (b) <tr> (c) <th> (d) <caption>
- 12.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
- 13.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.Which of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) 123456 (d) Mango#Kite29!
- 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
- 16.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
- 17.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
- 18.What does color do? (a) sets the letter colour (b) picks the font style (c) colours behind the text (d) makes the text bold
-
19.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>My pets</p> - 20.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 21.True or false: <aside> holds a news story. (a) True (b) False
-
22.⚖️ What colour is the text of this element?
<p class="star" id="hero">Hi</p>
CSS:
#hero { color: green; }
#hero { color: blue; } (a) white (b) green (c) red (d) blue -
23.⚡ What number does this code print?
let a = 17;
let b = 32;
console.log(a + b); - 24.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) bright green (d) cyan
- 25.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) bright green (d) yellow
-
26.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue</p> - 27.🎯 How many elements on a page should have the same id? (a) 2 (b) any number (c) 5 (d) 1
-
28.🔍 One closing tag is missing. Which one?
<h2>Cricket is fun.</h2>
<p>The red kite
<b>My best friend</b> (a) </p> (b) </small> (c) </b> (d) </h2> -
29.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>My best friend</h2>
<p>My pets</p> - 30.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
-
31.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Fun facts</p>
<p>The red kite</p>
<h2>Fun facts</h2>
<p>Our school trip</p> - 32.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
-
33.🔁 How many times does this code print “Well done”?
for (let i = 1; i < 10; i++) {
console.log("Well done");
} - 34.💪 Which flexbox property spaces boxes along a row? (a) display: flex (b) align-items (c) justify-content (d) gap
- 35.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
-
36.🖌️ What colour are the letters?
li {
background-color: red;
text-align: center;
color: green;
font-size: 40px;
} (a) red (b) green (c) yellow -
37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 270px;
padding: 15px;
border: 2px solid black;
margin: 10px;
} -
38.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <em>Fun facts</em>
line 3: <b>Hello, world! (a) line 1 (b) line 2 (c) line 3 -
39.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My pets</p>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<h2>The red kite</h2> - 40.🎨 A CSS file usually ends with which extension? (a) .css (b) .js (c) .png (d) .html
Answer key
- 3
- an element selector
- a line across the page
- screen-reader users
- green
- 16
- 600px or narrower
- border
- maths.html
- False
- <caption>
- <h1>
- an opening tag
- 123456
- the later one
- a web server
- </strong>
- sets the letter colour
- 1
- in the body
- False
- blue
- 49
- bright green
- yellow
- 2
- 1
- </p>
- 2
- to leave notes
- 4
- <h6>
- 9
- justify-content
- <!DOCTYPE html>
- green
- 304
- line 3
- 3
- .css
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids