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 of these is a closing tag? (a) <h1> (b) <p> (c) </title> (d) <li>
- 2.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
3.⚡ What does this code show?
let name = "Aman";
console.log("Well done, " + name + "!"); (a) Well done, Aman! (b) Aman (c) Well done, name! (d) name - 4.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) has an address bar (d) is where we type code
- 5.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
-
6.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> --> - 7.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Creative Sheet System (c) Colourful Site Styles (d) Cascading Style Sheets
- 8.♿ Which link text is clearest? (a) Read the fruit facts (b) link (c) click here (d) here
- 9.⚡ Which JavaScript word runs code when true? (a) alert() (b) if (c) let (d) console.log()
- 10.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
-
11.🔍 One closing tag is missing. Which one?
<b>I love mangoes.
<p>Cricket is fun.</p>
<i>My best friend</i> (a) </p> (b) </em> (c) </b> (d) </i> - 12.True or false: <img> goes in the body. (a) False (b) True
- 13.Which of these is an empty tag? (a) <p> (b) <b> (c) <title> (d) <input>
- 14.📊 In a table, which tag is a row? (a) <tr> (b) <td> (c) <th> (d) <tb>
- 15.💪 Which flexbox property picks row or column? (a) display: flex (b) gap (c) align-items (d) flex-direction
- 16.🚀 Which file is best for the colours and fonts? (a) script.js (b) photo.jpg (c) index.html (d) style.css
-
17.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) href (d) art.html - 18.Which of these is a strong password? (a) 123456 (b) 111111 (c) S0lar!Pen#8 (d) password
- 19.Which of these is not safe to do online? (a) tell a trusted adult (b) ask before downloading (c) think before you post (d) type a password on http
-
20.🔁 How many times does this code print “Hi”?
for (let i = 1; i <= 4; i++) {
console.log("Hi");
} -
21.✍️ Which property is set to yellow in this rule?
h2 {
font-style: italic;
background-color: yellow;
color: red;
} (a) margin (b) yellow (c) background-color (d) padding -
22.⚡ What does this code show?
let name = "Arjun";
console.log("Hi, " + name + "!"); (a) name (b) Arjun (c) Hi, name! (d) Hi, Arjun! -
23.📊 How many cells does this table have in all?
<table>
<tr><td>Orange</td><td>Papaya</td><td>Mango</td></tr>
<tr><td>Grapes</td><td>Orange</td><td>Mango</td></tr>
</table> - 24.True or false: <hr> has a closing tag. (a) True (b) False
- 25.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
- 26.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
- 27.True or false: in <img>, width sets how tall it is. (a) False (b) True
- 28.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
- 29.⚡ Which JavaScript word makes a new variable? (a) console.log() (b) for (c) alert() (d) let
-
30.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> (a) My best friend (b) Fun facts (c) I love mangoes. - 31.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 32.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <p>
-
33.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Easy snacks (b) Here is my best one. (c) index.html (d) Art Gallery - 34.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
-
35.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 50px;
padding: 5px;
border: 4px solid black;
margin: 15px;
} - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
-
37.🔁 What does this code print?
let age = 33;
if (age >= 8) {
console.log("teen");
} else {
console.log("child");
} (a) teen (b) child -
38.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 170px;
justify-content: flex-start;
}
Inside are 4 boxes, each 40px wide (no margins). -
39.📋 What number does the browser show next to “Mango”?
<ol start="3">
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 40.Which of these is an opening tag? (a) <h1> (b) </title> (c) </li> (d) </p>
Answer key
- </title>
- an opening tag
- Well done, Aman!
- has an address bar
- #0000ff
- 3
- Cascading Style Sheets
- Read the fruit facts
- if
- <!DOCTYPE html>
- </b>
- True
- <input>
- <tr>
- flex-direction
- style.css
- Take the quiz
- S0lar!Pen#8
- type a password on http
- 4
- background-color
- Hi, Arjun!
- 6
- False
- False
- No
- False
- easy to read
- let
- My best friend
- False
- <p>
- Art Gallery
- 72
- 98
- <h1>
- teen
- 10
- 5
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids