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: <input type="checkbox"> is for an email address. (a) False (b) True
- 2.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 3.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
- 4.🎨 Which attribute adds CSS inside one tag? (a) alt (b) src (c) href (d) style
-
5.🌍 What is the protocol in this URL?
http://www.example.net/news/today.html (a) https (b) /news/today.html (c) www.example.net (d) http -
6.🔗 Where does this link open?
<a href="contact.html">Contact us</a> (a) in a new tab (b) in the same tab - 7.True or false: <td> gives the table a title. (a) True (b) False
-
8.🌍 What is the path in this URL?
http://learn.example.com/news/today.html (a) /games/chess.html (b) /news/today.html (c) learn.example.com (d) http -
9.⚡ What does this code print? (Look at the quotes!)
let x = "7";
let y = 4;
console.log(x + y); (a) 74 (b) Error (c) 11 - 10.📝 Which input type takes only numbers? (a) radio (b) submit (c) number (d) text
-
11.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 6; i++) {
total = total + 7;
}
console.log(total); -
12.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> (a) Good morning! (b) Our school trip (c) My pets - 13.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the title tag (d) the br tag
- 14.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
- 15.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
-
16.📱 The screen is 375px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 6px;
}
} (a) Yes (b) No - 17.Which of these is the content? (a) the text or picture (b) the gap round content (c) space outside the border (d) space inside the border
-
18.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (max-width: 768px) {
p {
font-size: 18px;
}
} (a) Yes (b) No -
19.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-size: 20px;
} -
20.🖌️ What colour is behind the letters?
li {
text-align: left;
color: white;
font-size: 20px;
background-color: green;
} (a) green (b) white (c) yellow - 21.Which of these is true of a web browser? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) opens web pages for us
- 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
-
23.🔁 How many numbers does this code print?
for (let i = 0; i < 16; i = i + 3) {
console.log(i);
} - 24.✍️ Which sign ends each CSS declaration? (a) : (b) . (c) ; (d) ,
-
25.✍️ What is the selector in this CSS rule?
h1 {
font-weight: bold;
font-style: italic;
} (a) italic (b) h1 (c) p (d) font-weight -
26.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Orange</td><td>Jamun</td><td>Banana</td></tr>
<tr><td>Grapes</td><td>Banana</td><td>Grapes</td></tr>
<tr><td>Papaya</td><td>Mango</td><td>Litchi</td></tr>
</table> - 27.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
-
28.⚡ What does this code show?
let name = "Riya";
console.log("Hi, " + name + "!"); (a) Hi, name! (b) Riya (c) name (d) Hi, Riya! - 29.✍️ CSS declarations go inside which brackets? (a) < > (b) [ ] (c) { } (d) ( )
- 30.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 31.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
- 32.True or false: HTML gives the page structure. (a) False (b) True
- 33.True or false: <hr> has a closing tag. (a) False (b) True
-
34.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 6;
}
console.log(total); - 35.🌍 What does a web address (URL) tell the browser? (a) the page colour (b) your password (c) where the page is (d) how old you are
-
36.🔍 One closing tag is missing. Which one?
<h3>Good morning!
<small>Hello, world!</small>
<b>My pets</b> (a) </b> (b) </small> (c) </h3> (d) </p> - 37.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> -
39.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<!-- <p>Good morning!</p> --> -
40.🔁 How many numbers does this code print?
for (let i = 0; i < 20; i = i + 2) {
console.log(i);
}
Answer key
- False
- False
- True
- style
- http
- in the same tab
- False
- /news/today.html
- 74
- number
- 42
- Good morning!
- the viewport meta tag
- 1
- alt
- Yes
- the text or picture
- No
- 1
- green
- opens web pages for us
- <ol>
- 6
- ;
- h1
- 3
- an element selector
- Hi, Riya!
- { }
- in the head
- False
- True
- False
- 24
- where the page is
- </h3>
- No
- 300
- 1
- 10
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids