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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="400"> (a) width (b) kite.png (c) Map of India (d) A red kite -
2.🌍 What is the protocol in this URL?
https://learn.example.com/art/gallery.html (a) learn.example.com (b) http (c) /art/gallery.html (d) https - 3.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
- 4.True or false: <input type="password"> sends the form. (a) True (b) False
- 5.🌐 Which one answers page requests? (a) a web browser (b) a web server (c) a code editor
-
6.🔍 Which line is missing its closing tag?
line 1: <b>My pets</b>
line 2: <strong>The red kite</strong>
line 3: <h1>My best friend (a) line 3 (b) line 2 (c) line 1 - 7.🔢 When you open a web page, which comes LAST? (a) the browser shows it (b) you type the URL (c) the browser asks it (d) DNS finds the server
- 8.True or false: JavaScript rounds box corners. (a) False (b) True
- 9.True or false: the border is the line round the box. (a) True (b) False
-
10.⚖️ What colour is the text of this element?
<h1 class="red" id="hero">Hi</h1>
CSS:
h1 { color: black; }
#hero { color: blue; } (a) green (b) red (c) black (d) blue -
11.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 110px;
justify-content: space-between;
}
Inside are 2 boxes, each 40px wide (no margins). - 12.True or false: <input> has a closing tag. (a) True (b) False
- 13.Which of these is true of <main>? (a) sits at the bottom (b) holds a side box of tips (c) holds the logo and title (d) holds the main content
-
14.🎯 Which CSS selector matches this element?
<li class="box" id="hero">Hello</li> (a) #top (b) div (c) #hero (d) .hero - 15.True or false: “colour as the only clue” makes the page harder to use. (a) False (b) True
- 16.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 17.📝 Which input type takes only numbers? (a) text (b) date (c) password (d) number
- 18.🔍 Which is the odd one out? (a) shows a pop-up message (b) makes a form box (c) checks a quiz answer (d) counts down a timer
-
19.✍️ Which property is set to 2px solid in this rule?
h2 {
border: 2px solid;
font-size: 20px;
} (a) 2px solid (b) width (c) font-style (d) border - 20.Which of these is not safe to do online? (a) use a strong password (b) ask before downloading (c) tell a trusted adult (d) download from pop-ups
- 21.🔍 Which is the odd one out? (a) colours code to help us (b) stores a website’s files (c) answers page requests (d) sends pages over the net
-
22.✍️ Which property is set to 20px in this rule?
h1 {
font-weight: bold;
font-size: 20px;
border: 2px solid;
color: red;
} (a) background-color (b) font-size (c) text-align (d) 20px - 23.What does font-size do? (a) centres a heading (b) makes the text bold (c) picks the font style (d) makes letters bigger
-
24.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 200px;
padding: 5px;
border: 3px solid black;
margin: 5px;
} - 25.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
-
26.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Mango</li>
<li>Orange</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> -
27.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p>
<p>My pets</p> - 28.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <title> (d) <hr>
-
29.⚡ What does this code print? (Look at the quotes!)
let x = "3";
let y = 7;
console.log(x + y); (a) Error (b) 10 (c) 37 -
30.⚡ What number does this code print?
let a = 6;
let b = 3;
console.log(a * b); -
31.✍️ What value is given to background-color in this rule?
h2 {
background-color: yellow;
padding: 8px;
} (a) 10px (b) background-color (c) yellow (d) 8px -
32.🌍 What is the protocol in this URL?
http://www.example.net/index.html (a) /index.html (b) www.example.net (c) https (d) http - 33.Which of these does HTML do? (a) reacts to a button click (b) makes headings and lists (c) checks a quiz answer (d) counts down a timer
- 34.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) hosts websites online
- 35.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 36.Which of these goes in the body? (a) <img> (b) <style> (c) <link rel="stylesheet"> (d) <title>
- 37.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
38.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 39.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 40.True or false: #main is an element selector. (a) False (b) True
Answer key
- A red kite
- https
- to leave notes
- False
- a web server
- line 3
- the browser shows it
- False
- True
- blue
- 30
- False
- holds the main content
- #hero
- True
- <a>
- number
- makes a form box
- border
- download from pop-ups
- colours code to help us
- font-size
- makes letters bigger
- 226
- <h6>
- 5
- 2
- <label>
- 37
- 18
- yellow
- http
- makes headings and lists
- hosts websites online
- 3
- <img>
- on the browser tab
- in a new tab
- False
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids