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 line is missing its closing tag?
line 1: <p>My pets
line 2: <em>My best friend</em>
line 3: <i>Cricket is fun.</i> (a) line 3 (b) line 2 (c) line 1 -
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) Here is my best one. (c) Planets (d) body - 3.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
-
4.🔁 What is the LAST number this code prints?
for (let i = 0; i < 8; i = i + 2) {
console.log(i);
} - 5.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
- 6.Which of these is a strong password? (a) Rain#Drop_42! (b) 123456 (c) password (d) riya2014
-
7.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> --> - 8.True or false: in <img>, width describes the picture. (a) False (b) True
- 9.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
- 10.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Computer Style Sheets (c) Creative Sheet System (d) Cascading Style Sheets
- 11.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
-
12.🖌️ What colour are the letters?
h2 {
font-size: 36px;
color: white;
text-align: right;
background-color: green;
} (a) red (b) green (c) white -
13.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> --> (a) Good morning! (b) My best friend (c) I love mangoes. (d) Fun facts - 14.📦 In the box model, which part is the text or picture? (a) padding (b) content (c) border (d) margin
-
15.🔁 What does this code print?
let score = 14;
if (score > 24) {
console.log("You win");
} else {
console.log("Play again");
} (a) Play again (b) You win - 16.Which of these is an empty tag? (a) <title> (b) <p> (c) <input> (d) <ul>
- 17.True or false: in <img>, src is read by screen readers. (a) True (b) False
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Welcome! (c) Space Facts (d) I like to read. -
19.🌍 What is the domain name in this URL?
https://kids.example.org/index.html (a) https (b) kids.example.org (c) school.example.in (d) /index.html - 20.✍️ CSS declarations go inside which brackets? (a) { } (b) [ ] (c) < > (d) ( )
- 21.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
-
23.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus - 24.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
- 25.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) weak (b) strong
-
26.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 170px;
padding: 25px;
border: 5px solid black;
margin: 5px;
} - 27.📊 Which tag makes one data cell? (a) <caption> (b) <th> (c) <td> (d) <table>
-
28.🔁 What does this code print?
let temp = 21;
if (temp < 31) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Cool (b) Hot -
29.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="email">
<input type="number">
<input type="password">
<input type="date">
<input type="submit" value="Send">
</form> - 30.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
-
31.⚡ What does this code show?
let name = "Riya";
alert("Hi, " + name + "!"); (a) Hi, Riya! (b) Riya (c) Hi, name! (d) name - 32.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) makes it harder (b) helps everyone
- 33.🔢 When you open a web page, what comes right after “the server sends files”? (a) the browser shows it (b) you type the URL (c) DNS finds the server (d) the browser asks it
- 34.🎯 How many elements on a page should have the same id? (a) any number (b) 1 (c) 2 (d) 5
- 35.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .png (d) .html
- 36.🎨 Which tag connects an outside CSS file? (a) <a> (b) <link> (c) <css> (d) <img>
- 37.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
-
38.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> - 39.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 40.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>
Answer key
- line 1
- Planets
- True
- 6
- 6
- Rain#Drop_42!
- 2
- False
- -->
- Cascading Style Sheets
- <a href="about.html">
- white
- Fun facts
- content
- Play again
- <input>
- False
- Space Facts
- kids.example.org
- { }
- <ul>
- <!DOCTYPE html>
- bus.jpg
- the body
- strong
- 240
- <td>
- Hot
- 6
- src
- Hi, Riya!
- makes it harder
- the browser shows it
- 1
- .html
- <link>
- <li>
- 4
- in the body
- <h5>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids