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: in <img>, src names the picture file. (a) True (b) False
- 2.🛡️ Online: is it safe to click prize links? (a) safe (b) not safe
- 3.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
- 4.True or false: <ul> is one item of a list. (a) False (b) True
- 5.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
-
6.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 100px;
padding: 5px;
border: 4px solid black;
margin: 5px;
} -
7.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) href (b) quiz.html (c) Maths fun (d) Art corner - 8.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #ffff00
- 9.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Modern (d) Markup
- 10.📱 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
- 11.True or false: padding is the line round the box. (a) True (b) False
-
12.🔁 What does this code print?
let marks = 33;
if (marks >= 17) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass -
13.🖌️ How big is the text, in px?
p {
font-size: 12px;
background-color: green;
color: purple;
text-align: left;
} - 14.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
- 15.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) gap (d) justify-content
- 16.True or false: <input type="radio"> lets you pick only one. (a) False (b) True
- 17.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
-
18.⚖️ What colour is the text of this element?
<p class="note" id="top">Hi</p>
CSS:
#top { color: orange; }
#top { color: red; } (a) white (b) red (c) blue (d) orange - 19.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 20.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
-
21.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) art.html (b) About us (c) href (d) Play games -
22.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Hello, world!</p>
<p>Good morning!</p>
<h2>The red kite</h2>
<h2>Good morning!</h2> - 23.True or false: body is an id selector. (a) True (b) False
- 24.📝 Which tag makes a drop-down list? (a) <ul> (b) <select> (c) <ol> (d) <li>
-
25.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> (a) Our school trip (b) Cricket is fun. (c) My pets - 26.🧭 Which semantic tag sits at the bottom? (a) <nav> (b) <main> (c) <footer> (d) <article>
-
27.🔗 Where does this link open?
<a href="about.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab -
28.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 180px;
justify-content: flex-start;
}
Inside are 2 boxes, each 80px wide (no margins). - 29.🔢 To build and share your first web page, what comes right after “write the HTML”? (a) test in a browser (b) publish it online (c) add CSS styles (d) plan what to show
- 30.True or false: the browser shows the page to you. (a) False (b) True
-
31.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.com/about.html (a) Yes (b) No - 32.🖌️ Which CSS property makes letters bigger? (a) color (b) font-size (c) text-align (d) font-weight
- 33.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the later one (d) the shorter one
- 34.🌍 What does a web address (URL) tell the browser? (a) how old you are (b) where the page is (c) the page colour (d) your password
- 35.True or false: to check for https first is safe. (a) False (b) True
- 36.True or false: the border is the line round the box. (a) True (b) False
-
37.✍️ What value is given to font-size in this rule?
li {
margin: 10px;
width: 300px;
font-size: 20px;
} (a) 20px (b) font-size (c) yellow (d) center - 38.True or false: img is an element selector. (a) True (b) False
- 39.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
-
40.🔁 How many times does this code print “Hello”?
for (let i = 2; i <= 10; i++) {
console.log("Hello");
}
Answer key
- True
- not safe
- to leave notes
- False
- <!DOCTYPE html>
- 128
- Maths fun
- #000000
- Markup
- the viewport meta tag
- False
- Pass
- 12
- <li>
- justify-content
- True
- <ol>
- red
- <ol>
- width
- Play games
- 3
- False
- <select>
- My pets
- <footer>
- in a new tab
- 20
- add CSS styles
- True
- Yes
- font-size
- the later one
- where the page is
- True
- True
- 20px
- True
- 48
- 9
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids