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: score = score + 1; goes in script.js. (a) True (b) False
- 2.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
- 3.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
- 4.🧭 How many <main> parts should a page have? (a) none (b) one (c) three (d) ten
- 5.♿ Who uses a screen reader? (a) people who are blind (b) only teachers (c) only coders (d) only robots
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Cricket Club (c) Try this poha. (d) index.html - 7.True or false: HTML on its own cannot make tables. (a) True (b) False
- 8.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </title>
- 9.Which of these is a strong password? (a) 123456 (b) 111111 (c) Chai$Cup_19x (d) password
-
10.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>The red kite</p>
<h2>Our school trip</h2>
<p>My pets</p> -
11.🌍 What is the path in this URL?
https://www.example.net/news/today.html (a) https (b) /news/today.html (c) www.example.net (d) /games/chess.html -
12.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> --> -
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) width (b) Birthday cake (c) A happy dog (d) cake.jpg - 14.🎨 One CSS file can style how many pages? (a) many pages (b) no pages (c) only one image (d) only one word
-
15.🔁 How many numbers does this code print?
for (let i = 0; i < 7; i = i + 4) {
console.log(i);
} -
16.✍️ How many declarations (property: value pairs) are in this rule?
#top {
width: 300px;
font-style: italic;
font-size: 20px;
} - 17.Which of these does JavaScript do? (a) puts a picture on a page (b) gives the page structure (c) lays out the page (d) counts down a timer
- 18.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <link> (d) <a>
- 19.🌗 Is red on green easy or hard to read? (a) hard to read (b) easy to read
-
20.📊 How many cells does this table have in all?
<table>
<tr><td>Papaya</td><td>Orange</td><td>Mango</td><td>Litchi</td></tr>
<tr><td>Banana</td><td>Jamun</td><td>Guava</td><td>Grapes</td></tr>
<tr><td>Mango</td><td>Banana</td><td>Grapes</td><td>Mango</td></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Mango</td><td>Mango</td></tr>
</table> -
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Planets</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) We won by 5 runs. (b) Planets (c) body (d) Art Gallery - 22.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
-
23.✍️ How many declarations (property: value pairs) are in this rule?
.note {
width: 300px;
font-size: 20px;
} - 24.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
- 25.Which of these is a closing tag? (a) <h1> (b) <title> (c) <li> (d) </body>
-
26.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 480px) {
p {
font-size: 22px;
}
} -
27.🎯 Which CSS selector matches this element?
<p class="menu" id="logo">Hello</p> (a) h1 (b) #end (c) .logo (d) #logo -
28.🔁 What is the LAST number this code prints?
for (let i = 0; i < 10; i = i + 2) {
console.log(i);
} - 29.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
30.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>My pets</p> -
31.⚖️ What colour is the text of this element?
<p class="big" id="hero">Hi</p>
CSS:
p { color: red; }
p { color: white; } (a) orange (b) purple (c) red (d) white -
32.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg - 33.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 34.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 35.🌈 Which colour is #00ff00? (a) magenta (b) red (c) bright green (d) black
- 36.📦 In the box model, which part is the gap round content? (a) margin (b) border (c) padding (d) content
- 37.What does justify-content: flex-end do? (a) packs boxes at the start (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the end
- 38.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) cyan (d) magenta
- 39.Which of these does CSS do? (a) makes headings and lists (b) changes the page live (c) reacts to a button click (d) sets colours and fonts
- 40.What is <input type="password"> for? (a) lets you pick only one (b) hides what you type (c) picks a day (d) sends the form
Answer key
- True
- <a href="about.html">
- <ol>
- one
- people who are blind
- Cricket Club
- False
- </title>
- Chai$Cup_19x
- 3
- /news/today.html
- 2
- Birthday cake
- many pages
- 2
- 3
- counts down a timer
- <link>
- hard to read
- 16
- Planets
- an element selector
- 2
- a slash /
- </body>
- 22
- #logo
- 8
- href
- 2
- white
- An old fort
- an empty tag
- a closing tag
- bright green
- padding
- packs boxes at the end
- magenta
- sets colours and fonts
- hides what you type
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids