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.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
- 2.True or false: <b> is an empty tag. (a) False (b) True
- 3.📊 Which tag makes one table row? (a) <table> (b) <td> (c) <caption> (d) <tr>
-
4.⚖️ What colour is the text of this element?
<h2 class="big" id="main">Hi</h2>
CSS:
#main { color: orange; }
#main { color: blue; } (a) white (b) purple (c) blue (d) orange - 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 6.🌈 Which colour is #00ff00? (a) cyan (b) magenta (c) bright green (d) yellow
- 7.📝 Which tag gives a form box a name you can click? (a) <title> (b) <hr> (c) <label> (d) <h1>
-
8.🔁 How many times does this code print “Hello”?
for (let i = 2; i < 9; i++) {
console.log("Hello");
} - 9.📊 Which tag makes a heading cell? (a) <td> (b) <tr> (c) <caption> (d) <th>
- 10.🌍 What does a web address (URL) tell the browser? (a) your password (b) where the page is (c) how old you are (d) the page colour
-
11.⚖️ What colour is the text of this element?
<h2 class="note" id="intro">Hi</h2>
CSS:
.note { color: yellow; }
.note { color: white; } (a) orange (b) yellow (c) white (d) blue - 12.🎨 Which tag holds CSS inside the head? (a) <css> (b) <body> (c) <script> (d) <style>
- 13.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) the first one (d) neither
-
14.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>My pets</p> -->
<p>Rain today</p> - 15.Which of these is margin? (a) the gap round content (b) space outside the border (c) the text or picture (d) space inside the border
- 16.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
-
17.🔒 Is the connection to this address scrambled (encrypted)?
https://school.example.in/art/gallery.html (a) No (b) Yes -
18.🌍 What is the path in this URL?
https://www.example.net/games/chess.html (a) www.example.net (b) /games/chess.html (c) /about.html (d) https -
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> -
20.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="250"> (a) dog.jpg (b) Birthday cake (c) cake.jpg (d) moon.png - 21.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
- 22.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 23.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) flex-start (c) center (d) space-between
- 24.📝 Which input type hides what you type? (a) email (b) checkbox (c) radio (d) password
- 25.🌗 Is pink on red easy or hard to read? (a) hard to read (b) easy to read
-
26.🎯 Which CSS selector matches this element?
<li class="note" id="intro">Hello</li> (a) .big (b) div (c) #main (d) .note - 27.🔢 To build and share your first web page, which comes LAST? (a) write the HTML (b) add CSS styles (c) plan what to show (d) publish it online
- 28.📊 Which tag makes one data cell? (a) <caption> (b) <table> (c) <td> (d) <tr>
- 29.True or false: .star is a class selector. (a) False (b) True
- 30.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
- 31.🌗 Is yellow on black easy or hard to read? (a) easy to read (b) hard to read
-
32.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 200px;
justify-content: flex-end;
}
Inside are 3 boxes, each 50px wide (no margins). -
33.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<h3>I love mangoes.</h3>
<p>The red kite</p>
<h2>My pets</h2> -
34.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 180px;
padding: 25px;
border: 2px solid black;
margin: 5px;
} -
35.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) Planets (c) body (d) Riya’s Recipes - 36.True or false: margin is the line round the box. (a) False (b) True
- 37.🌈 Which colour of light is strongest in rgb(30, 76, 167)? (a) blue (b) green (c) red
-
38.🖌️ How big is the text, in px?
p {
font-size: 16px;
color: blue;
background-color: red;
text-align: left;
} - 39.✍️ CSS declarations go inside which brackets? (a) { } (b) < > (c) [ ] (d) ( )
-
40.🔁 How many times does this code print “Hi”?
for (let i = 3; i <= 10; i++) {
console.log("Hi");
}
Answer key
- starts a new line
- False
- <tr>
- blue
- F
- bright green
- <label>
- 7
- <th>
- where the page is
- white
- <style>
- the later one
- 1
- space outside the border
- height
- Yes
- /games/chess.html
- 2
- cake.jpg
- text stands out clearly
- <img>
- flex-start
- password
- hard to read
- .note
- publish it online
- <td>
- True
- a slash /
- easy to read
- 50
- 3
- 244
- Planets
- False
- blue
- 16
- { }
- 8
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids