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.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
2.🔁 How many numbers does this code print?
for (let i = 0; i < 19; i = i + 2) {
console.log(i);
} - 3.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the doctype (d) the head
- 4.Which of these is an empty tag? (a) <ul> (b) <p> (c) <meta> (d) <b>
- 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 7.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) </html> (d) <html>
-
8.📱 The screen is 1100px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (min-width: 480px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 9.⚡ Which JavaScript word runs code when true? (a) console.log() (b) alert() (c) for (d) if
-
10.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Orange</li>
<li>Litchi</li>
</ul> -
11.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Banana</td><td>Grapes</td><td>Guava</td><td>Papaya</td></tr>
<tr><td>Grapes</td><td>Mango</td><td>Orange</td><td>Jamun</td></tr>
</table> - 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
- 13.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) HyperText (d) Home Text
- 14.True or false: .big is a class selector. (a) True (b) False
-
15.🔍 Which line is missing its closing tag?
line 1: <i>Our school trip</i>
line 2: <h2>My pets</h2>
line 3: <u>Good morning! (a) line 2 (b) line 1 (c) line 3 - 16.What is <input type="submit"> for? (a) lets you pick only one (b) sends the form (c) lets you tick many (d) picks a day
- 17.Which of these is padding? (a) the gap round content (b) the text or picture (c) the gap to other boxes (d) space outside the border
- 18.Which of these is an opening tag? (a) </li> (b) </title> (c) </body> (d) <p>
- 19.True or false: in <img>, height shows if the image fails. (a) False (b) True
- 20.What does justify-content: flex-start do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
-
21.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) news.html (b) art.html (c) maths.html (d) Maths fun -
22.✍️ What value is given to text-align in this rule?
#top {
background-color: yellow;
text-align: center;
padding: 8px;
width: 300px;
} (a) yellow (b) center (c) text-align (d) 10px - 23.🎯 What kind of selector is #end? (a) an element selector (b) an id selector (c) a class selector
- 24.True or false: HTML on its own can make tables. (a) True (b) False
-
25.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) map.png (b) cake.jpg (c) dog.jpg (d) Map of India - 26.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <a> (d) <link>
-
27.✍️ How many declarations (property: value pairs) are in this rule?
p {
color: red;
} -
28.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 5; i++) {
total = total + i;
}
console.log(total); - 29.True or false: <li> is an ordered list. (a) False (b) True
- 30.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
-
31.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="colour"> Blue
<input type="radio" name="colour"> Red
<input type="radio" name="colour"> Green
<input type="radio" name="colour"> Pink
<input type="radio" name="colour"> Orange
</form> - 32.True or false: console.log(5 + 2); goes in index.html. (a) False (b) True
- 33.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
- 34.Which of these is true of <header>? (a) sits at the bottom (b) holds the menu of links (c) holds extra side notes (d) holds the logo and title
- 35.What is <input type="radio"> for? (a) takes only numbers (b) lets you pick only one (c) hides what you type (d) is for one line of words
- 36.🎯 What kind of selector is p? (a) a class selector (b) an element selector (c) an id selector
- 37.📝 Which input type picks a day? (a) number (b) password (c) date (d) radio
-
38.🖌️ How big is the text, in px?
li {
font-size: 20px;
background-color: black;
text-align: center;
color: purple;
} -
39.🖌️ Where does the text sit on its line?
h1 {
font-size: 36px;
text-align: center;
color: white;
background-color: yellow;
} (a) on the left (b) on the right (c) in the middle - 40.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- an opening tag
- 10
- the body
- <meta>
- opens it in a new tab
- A tiger asleep
- </html>
- Yes
- if
- 3
- 4
- <!DOCTYPE html>
- HyperText
- True
- line 3
- sends the form
- the gap round content
- <p>
- False
- packs boxes at the start
- maths.html
- center
- an id selector
- True
- map.png
- <link>
- 1
- 15
- False
- <ul>
- 1
- False
- easy to read
- holds the logo and title
- lets you pick only one
- an element selector
- date
- 20
- in the middle
- in the head
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids