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 CSS selector matches this element?
<h1 class="star" id="end">Hello</h1> (a) #end (b) #hero (c) #star (d) .end - 2.✍️ CSS declarations go inside which brackets? (a) ( ) (b) < > (c) { } (d) [ ]
-
3.🔗 Which address opens when you click this link?
<a href="quiz.html">About us</a> (a) about.html (b) quiz.html (c) games.html (d) About us -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep -
5.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 6px;
}
} - 6.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
-
7.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 480px) {
p {
font-size: 8px;
}
} -
8.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Banana
<input type="checkbox" name="fruit"> Litchi
<input type="checkbox" name="fruit"> Papaya
</form> - 9.True or false: a web server hosts websites online. (a) False (b) True
-
10.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.com/news/today.html (a) No (b) Yes - 11.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 12.True or false: <img src="cat.png"> goes in style.css. (a) True (b) False
- 13.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
-
14.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 1024px) {
p {
font-size: 18px;
}
} - 15.🎯 Which sign starts a class selector? (a) # (b) & (c) . (d) @
- 16.Which of these is a strong password? (a) riya2014 (b) iloveyou (c) S0lar!Pen#8 (d) abcd1234
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
-
18.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 50px;
padding: 5px;
border: 2px solid black;
margin: 0px;
} - 19.What does font-size do? (a) colours behind the text (b) makes letters bigger (c) makes the text bold (d) picks the font style
- 20.Which of these is true of a code editor? (a) is where we type code (b) stores a website’s files (c) shows pages from the web (d) hosts websites online
- 21.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <footer> (b) <main> (c) <header>
- 22.💪 Which flexbox property lines boxes up across? (a) justify-content (b) gap (c) flex-direction (d) align-items
- 23.True or false: <title> goes in the head. (a) True (b) False
- 24.📝 Which tag holds a whole form? (a) <table> (b) <ol> (c) <input> (d) <form>
- 25.📦 In the box model, which part is the gap round content? (a) border (b) padding (c) content (d) margin
- 26.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
-
27.📋 What number does the browser show next to “Grapes”?
<ol start="3">
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
</ol> -
28.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>My pets</p>
<h4>My best friend</h4> -
29.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> --> -
30.🔒 Is the connection to this address scrambled (encrypted)?
http://learn.example.com/art/gallery.html (a) Yes (b) No - 31.🧩 Which language reacts to a button click? (a) HTML (b) CSS (c) JavaScript
- 32.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
-
33.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>The red kite</p> --> - 34.📦 In the box model, which part is the text or picture? (a) content (b) margin (c) border (d) padding
- 35.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) script.js (c) index.html (d) style.css
- 36.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h3> (b) <h1> (c) <h5> (d) <h6>
-
37.🔍 Which line is missing its closing tag?
line 1: <i>My pets</i>
line 2: <em>Hello, world!
line 3: <h3>The red kite</h3> (a) line 2 (b) line 3 (c) line 1 - 38.True or false: in <img>, src tells which image to load. (a) True (b) False
- 39.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #00ffff
- 40.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
Answer key
- #end
- { }
- quiz.html
- A tiger asleep
- 6
- hard to read
- 8
- 3
- True
- No
- in the body
- False
- <h6>
- 16
- .
- S0lar!Pen#8
- 3
- 64
- makes letters bigger
- is where we type code
- <main>
- align-items
- True
- <form>
- padding
- <
- 6
- 2
- 1
- No
- JavaScript
- a slash /
- 2
- content
- script.js
- <h6>
- line 2
- True
- #ff0000
- <html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids