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 attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
-
2.🖌️ Where does the text sit on its line?
li {
text-align: center;
background-color: black;
color: green;
font-size: 36px;
} (a) on the left (b) on the right (c) in the middle -
3.✍️ Which property is set to 20px in this rule?
h1 {
background-color: yellow;
font-size: 20px;
} (a) background-color (b) text-align (c) font-size (d) 20px -
4.🔍 One closing tag is missing. Which one?
<p>Hello, world!</p>
<strong>Rain today</strong>
<em>Good morning! (a) </h1> (b) </p> (c) </strong> (d) </em> - 5.True or false: margin is space inside the border. (a) True (b) False
- 6.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 8.🎯 Which sign starts an id selector? (a) @ (b) # (c) . (d) &
-
9.⚖️ What colour is the text of this element?
<h2 class="star" id="main">Hi</h2>
CSS:
#main { color: white; }
h2 { color: green; }
.star { color: blue; } (a) black (b) green (c) blue (d) white -
10.📝 How many <input> tags are in this form?
<form>
<input type="checkbox">
<input type="date">
<input type="text">
<input type="number">
<input type="submit" value="Send">
</form> - 11.🔍 Which is the odd one out? (a) sets colours and fonts (b) makes a form box (c) changes the text size (d) adds space around boxes
- 12.📝 What does <hr> draw? (a) a line across the page (b) a table (c) a picture (d) a link
-
13.🔁 What does this code print?
let age = 4;
if (age >= 12) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child - 14.True or false: “images with no alt” helps everyone use the page. (a) True (b) False
- 15.🔢 When you open a web page, which comes first: “the browser asks it” or “the browser shows it”? (a) the browser asks it (b) the browser shows it
- 16.🎯 Can many elements share the same class? (a) No (b) Yes
-
17.🔁 How many times does this code print “Hi”?
for (let i = 3; i < 12; i++) {
console.log("Hi");
} - 18.🧭 How many <main> parts should a page have? (a) one (b) none (c) ten (d) three
- 19.🌈 Which colour is #ffff00? (a) black (b) bright green (c) red (d) yellow
- 20.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <!DOCTYPE html> (d) <html>
-
21.🔗 Which address opens when you click this link?
<a href="news.html">Maths fun</a> (a) Maths fun (b) quiz.html (c) news.html (d) games.html - 22.True or false: <aside> holds a side box of tips. (a) True (b) False
- 23.True or false: p is an element selector. (a) False (b) True
- 24.♿ What does good colour contrast mean? (a) many bright colours (b) no colours at all (c) text stands out clearly (d) only red text
-
25.🔍 One closing tag is missing. Which one?
<em>Our school trip</em>
<i>Fun facts</i>
<u>I love mangoes. (a) </i> (b) </p> (c) </u> (d) </em> -
26.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p> - 27.True or false: to use a strong password is not safe. (a) True (b) False
- 28.🌈 Which hex code is blue? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #ffff00
-
29.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<p>Fun facts</p>
<h4>Hello, world!</h4> - 30.🔐 Is riya2014 a strong or a weak password? (a) weak (b) strong
- 31.What does font-weight do? (a) makes letters bigger (b) sets the letter colour (c) makes the text bold (d) centres a heading
- 32.🌈 Which colour of light is strongest in rgb(36, 6, 206)? (a) green (b) blue (c) red
-
33.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 50px;
padding: 30px;
border: 5px solid black;
margin: 0px;
} - 34.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) test in a browser (c) publish it online (d) plan what to show
- 35.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
- 36.True or false: HTML sets colours and fonts. (a) False (b) True
-
37.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>My best friend</h3>
<h2>Cricket is fun.</h2>
<h4>Fun facts</h4> - 38.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Cascading Style Sheets (c) Colourful Site Styles (d) Creative Sheet System
-
39.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Papaya</td><td>Mango</td><td>Banana</td></tr>
<tr><td>Litchi</td><td>Grapes</td><td>Orange</td></tr>
</table> - 40.True or false: in <img>, src sets how wide it is. (a) False (b) True
Answer key
- alt
- in the middle
- font-size
- </em>
- False
- href
- red
- #
- white
- 5
- makes a form box
- a line across the page
- child
- False
- the browser asks it
- Yes
- 9
- one
- yellow
- <!DOCTYPE html>
- news.html
- True
- True
- text stands out clearly
- </u>
- 4
- False
- #0000ff
- 2
- weak
- makes the text bold
- blue
- 120
- publish it online
- opens it in a new tab
- False
- 4
- Cascading Style Sheets
- 3
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids