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 list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 2.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
3.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> -
4.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>My pets</h3>
<p>Rain today</p> - 5.Which of these is true of a web browser? (a) turns HTML into a page (b) colours code to help us (c) is where we type code (d) stores a website’s files
- 6.True or false: alert(score); goes in index.html. (a) False (b) True
- 7.🔁 What does i++ do? (a) adds 1 to i (b) takes 1 from i (c) doubles i (d) prints i
- 8.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
-
9.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 10.📝 Which input type is for one line of words? (a) password (b) date (c) text (d) submit
- 11.True or false: in <img>, src shows if the image fails. (a) False (b) True
- 12.♿ Does this help everyone, or make the page harder to use: use headings in order? (a) helps everyone (b) makes it harder
- 13.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if
-
14.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="350"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png -
15.🔁 How many numbers does this code print?
for (let i = 0; i < 13; i = i + 4) {
console.log(i);
} - 16.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
- 17.✍️ In color: blue; which part is the value? (a) : (b) ; (c) blue (d) color
- 18.🔍 Which is the odd one out? (a) gives the page structure (b) lays out the page (c) makes a form box (d) makes headings and lists
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) width (b) A happy dog (c) cake.jpg (d) Birthday cake -
20.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + i;
}
console.log(total); - 21.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <link script.js> (c) <js src="script.js"> (d) <script src="script.js">
- 22.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
- 23.What is <input type="radio"> for? (a) hides what you type (b) is for one line of words (c) is for an email address (d) lets you pick only one
- 24.📱 What does a media query check? (a) the screen width (b) the battery level (c) the page title (d) the time of day
- 25.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
26.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Our school trip</p>
<p>Good morning!</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) My pets (c) Our school trip (d) Good morning! -
27.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Our school trip</h2>
<h3>Cricket is fun.</h3> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg - 29.🎯 Which element does the selector .big style? (a) <h2 id="big"> (b) <h2 class="big"> (c) <li class="box"> (d) <h2 class="red">
-
30.⚖️ What colour is the text of this element?
<h1 class="box" id="hero">Hi</h1>
CSS:
#hero { color: black; }
h1 { color: blue; } (a) black (b) purple (c) green (d) blue - 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
- 32.🚀 What is the home page file of a website usually called? (a) home.css (b) start.js (c) main.png (d) index.html
- 33.⚡ Which JavaScript word repeats code? (a) for (b) let (c) console.log() (d) alert()
-
34.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 180px;
justify-content: flex-end;
}
Inside are 4 boxes, each 40px wide (no margins). -
35.📊 How many rows does this table have?
<table>
<tr><td>Papaya</td><td>Banana</td></tr>
<tr><td>Guava</td><td>Banana</td></tr>
<tr><td>Mango</td><td>Guava</td></tr>
</table> -
36.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 768px) {
p {
font-size: 10px;
}
} - 37.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
- 38.True or false: a web server has an address bar. (a) False (b) True
- 39.🖌️ Which CSS property colours behind the text? (a) background-color (b) color (c) font-size (d) font-family
- 40.📝 Which tag gives a form box a name you can click? (a) <label> (b) <title> (c) <hr> (d) <h1>
Answer key
- <ul>
- in the body
- 2
- 2
- turns HTML into a page
- False
- adds 1 to i
- <h2>
- bullets
- text
- False
- helps everyone
- for
- map.png
- 4
- safe
- blue
- lays out the page
- Birthday cake
- 6
- <script src="script.js">
- <ul>
- lets you pick only one
- the screen width
- an empty tag
- Hello, world!
- 3
- A tiger asleep
- <h2 class="big">
- black
- opens it in a new tab
- index.html
- for
- 20
- 3
- 10
- the viewport meta tag
- False
- background-color
- <label>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids