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: <aside> holds extra side notes. (a) False (b) True
- 2.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 3.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
-
4.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + 5;
}
console.log(total); -
5.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg -
6.⚖️ What colour is the text of this element?
<p class="star" id="top">Hi</p>
CSS:
.star { color: black; }
.star { color: green; } (a) orange (b) purple (c) black (d) green - 7.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) click it twice (b) share it with friends (c) type the password (d) close it, tell an adult
-
8.⚡ What number does this code print?
let apples = 8;
apples = apples + 17;
apples = apples - 9;
console.log(apples); - 9.True or false: <style> goes in the body. (a) False (b) True
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) width (b) bus.jpg (c) Our school bus (d) An old fort -
11.✍️ Which property is set to 2px solid in this rule?
li {
width: 300px;
border: 2px solid;
font-style: italic;
background-color: yellow;
} (a) font-style (b) border (c) 2px solid (d) width - 12.🧭 Which semantic tag holds the main content? (a) <nav> (b) <main> (c) <aside> (d) <article>
- 13.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
14.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>I love mangoes.</h4>
<p>Our school trip</p> - 15.🧩 Which language lays out the page? (a) HTML (b) JavaScript (c) CSS
- 16.True or false: <h1> is an empty tag. (a) False (b) True
- 17.🔐 Is 111111 a strong or a weak password? (a) weak (b) strong
-
18.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red<br>Birds sing<br>Stars shine</p> - 19.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) style.css (c) index.html
- 20.True or false: a code editor stores a website’s files. (a) True (b) False
- 21.Which of these is an empty tag? (a) <br> (b) <li> (c) <h1> (d) <ul>
- 22.🎯 Which element does the selector #main style? (a) <h1 id="main"> (b) <h1 id="logo"> (c) <h2 class="menu"> (d) <h1 class="main">
- 23.⚡ Which JavaScript word writes in the console? (a) let (b) if (c) for (d) console.log()
- 24.⚡ Which word makes a new variable? (a) let (b) make (c) give (d) put
- 25.✍️ Which sign goes between a property and its value? (a) : (b) ; (c) - (d) =
- 26.🖌️ Which CSS property picks the font style? (a) font-family (b) background-color (c) text-align (d) font-size
- 27.🚀 Which file is best for the colours and fonts? (a) index.html (b) script.js (c) photo.jpg (d) style.css
-
28.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 230px;
padding: 30px;
border: 2px solid black;
margin: 5px;
} -
29.✍️ Which property is set to red in this rule?
.box {
font-size: 20px;
color: red;
} (a) font-size (b) red (c) text-align (d) color -
30.⚡ What number does this code print?
let marks = 26;
marks = marks + 18;
marks = marks - 7;
console.log(marks); -
31.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Rivers flow<br>Sky is blue</p> - 32.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
-
33.🔗 Which address opens when you click this link?
<a href="art.html">Visit the site</a> (a) quiz.html (b) art.html (c) Visit the site (d) news.html -
34.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 480px) {
p {
font-size: 10px;
}
} - 35.What does justify-content: flex-end do? (a) packs boxes at the end (b) packs boxes at the start (c) equal gaps, none at ends (d) puts boxes in the middle
- 36.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<footer>”? (a) <main> (b) <footer>
-
37.📋 What number does the browser show next to “Jamun”?
<ol start="8">
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
</ol> - 38.True or false: h1 { font-size: 32px; } goes in style.css. (a) False (b) True
- 39.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 40.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
Answer key
- True
- an empty tag
- Yes
- 15
- fort.jpg
- green
- close it, tell an adult
- 16
- False
- Our school bus
- border
- <main>
- No
- 2
- CSS
- False
- weak
- 4
- index.html
- False
- <br>
- <h1 id="main">
- console.log()
- let
- :
- font-family
- style.css
- 304
- color
- 37
- 4
- opens it in a new tab
- art.html
- 10
- packs boxes at the end
- <main>
- 9
- True
- <img>
- an attribute
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids