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.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
- 2.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
-
3.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 40px;
padding: 20px;
border: 1px solid black;
margin: 15px;
} - 4.Which of these is the content? (a) the line round the box (b) the gap to other boxes (c) the text or picture (d) the gap round content
-
5.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> - 6.Which of these does HTML do? (a) checks a quiz answer (b) shows a pop-up message (c) changes the text size (d) makes a form box
- 7.💪 Which flexbox property lines boxes up across? (a) gap (b) align-items (c) display: flex (d) justify-content
- 8.True or false: HTTPS stores the site’s files. (a) True (b) False
- 9.🌍 Which one asks for a web page? (a) HTTPS (b) the URL (c) the server (d) the browser
- 10.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
-
11.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + i;
}
console.log(total); - 12.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #00ffff
- 13.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) src (d) alt
- 14.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
- 15.♿ Does this help everyone, or make the page harder to use: write clear link text? (a) makes it harder (b) helps everyone
-
16.✍️ What value is given to font-weight in this rule?
p {
color: red;
width: 300px;
font-weight: bold;
} (a) font-weight (b) bold (c) 2px solid (d) 300px - 17.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) answers page requests
-
18.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (min-width: 480px) {
p {
font-size: 24px;
}
} (a) No (b) Yes - 19.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) yellow (d) white
- 20.True or false: JavaScript lays out the page. (a) True (b) False
- 21.Which of these is safe to do online? (a) meet an online stranger (b) put secrets in comments (c) download from pop-ups (d) ask before downloading
-
22.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> (a) The red kite (b) Cricket is fun. (c) I love mangoes. (d) My pets - 23.🔁 Which word runs code only when something is true? (a) for (b) if (c) let (d) log
-
24.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> --> - 25.🔍 Which is the odd one out? (a) sets colours and fonts (b) changes the text size (c) gives the page structure (d) lays out the page
-
26.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.com/news/today.html (a) No (b) Yes - 27.True or false: <li> is an empty tag. (a) False (b) True
-
28.🌍 What is the domain name in this URL?
http://kids.example.org/maths/tables.html (a) http (b) /maths/tables.html (c) kids.example.org (d) school.example.in - 29.🧭 Who is helped most by semantic tags? (a) only the server (b) nobody (c) screen-reader users (d) only the printer
- 30.💪 Which flexbox property picks row or column? (a) flex-direction (b) gap (c) display: flex (d) justify-content
-
31.🌍 What is the domain name in this URL?
http://www.example.com/art/gallery.html (a) http (b) www.example.com (c) kids.example.org (d) /art/gallery.html - 32.🚀 Which file should this code go in: alert(score); (a) script.js (b) index.html (c) style.css
- 33.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
-
34.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon -
35.🔍 One closing tag is missing. Which one?
<h3>Rain today
<p>Hello, world!</p>
<u>The red kite</u> (a) </u> (b) </p> (c) </em> (d) </h3> -
36.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (min-width: 1024px) {
p {
font-size: 26px;
}
} - 37.Which of these is safe to do online? (a) share your password (b) meet an online stranger (c) type a password on http (d) use a strong password
-
38.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>Good morning!</p> -
39.🎯 Which CSS selector matches this element?
<h2 class="menu" id="top">Hello</h2> (a) .menu (b) .top (c) #menu (d) .note - 40.True or false: a code editor opens web pages for us. (a) False (b) True
Answer key
- on the browser tab
- True
- 112
- the text or picture
- 50
- makes a form box
- align-items
- False
- the browser
- <h6>
- 6
- #ff0000
- src
- <a>
- helps everyone
- bold
- answers page requests
- Yes
- black
- False
- ask before downloading
- My pets
- if
- 2
- gives the page structure
- No
- False
- kids.example.org
- screen-reader users
- flex-direction
- www.example.com
- script.js
- <h1>
- moon.png
- </h3>
- 24
- use a strong password
- 2
- .menu
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids