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.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Mango</td><td>Jamun</td><td>Litchi</td></tr>
</table> - 2.🖌️ Which CSS property colours behind the text? (a) text-align (b) background-color (c) color (d) font-weight
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 4.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) yellow
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) width (b) tiger.jpg (c) A red kite (d) A tiger asleep - 6.True or false: <td> makes a heading cell. (a) True (b) False
- 7.🎯 What kind of selector is .big? (a) an id selector (b) a class selector (c) an element selector
-
8.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p> (a) Rain today (b) My best friend (c) Cricket is fun. - 9.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) bright green
-
10.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Roses are red<br>Stars shine</p> - 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
- 12.True or false: <li> has a closing tag. (a) False (b) True
-
13.🔍 Which line is missing its closing tag?
line 1: <h2>Our school trip</h2>
line 2: <p>The red kite
line 3: <h1>My pets</h1> (a) line 1 (b) line 2 (c) line 3 - 14.Which of these goes in the body? (a) <title> (b) <style> (c) <a> (d) <link rel="stylesheet">
- 15.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
- 16.🧭 Which semantic tag holds the main content? (a) <article> (b) <header> (c) <footer> (d) <main>
- 17.True or false: margin is the line round the box. (a) False (b) True
-
18.🎯 Which CSS selector matches this element?
<h1 class="note" id="main">Hello</h1> (a) .note (b) #note (c) .main (d) h2 - 19.True or false: <ul><li>Art</li></ul> goes in index.html. (a) True (b) False
-
20.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + i;
}
console.log(total); -
21.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p> - 22.🔁 Which word runs code only when something is true? (a) for (b) log (c) let (d) if
- 23.True or false: body { margin: 0; } goes in script.js. (a) False (b) True
- 24.🌈 Which colour of light is strongest in rgb(182, 126, 36)? (a) blue (b) red (c) green
-
25.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Maths fun (b) href (c) https://example.com (d) Visit the site - 26.What is <input type="date"> for? (a) sends the form (b) picks a day (c) is for one line of words (d) lets you pick only one
- 27.True or false: <input type="radio"> hides what you type. (a) True (b) False
- 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
-
29.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-weight: bold;
} -
30.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) Rain today - 31.What does background-color do? (a) sets the letter colour (b) makes letters bigger (c) picks the font style (d) colours behind the text
- 32.Which of these is the content? (a) space outside the border (b) space inside the border (c) the line round the box (d) the text or picture
- 33.True or false: .menu is an element selector. (a) False (b) True
- 34.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
- 35.💪 Which justify-content value packs boxes at the end? (a) space-between (b) center (c) flex-start (d) flex-end
-
36.🔍 One closing tag is missing. Which one?
<small>My pets</small>
<h1>Our school trip</h1>
<strong>Rain today (a) </h1> (b) </small> (c) </strong> (d) </b> - 37.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
-
38.📋 What number does the browser show next to “Grapes”?
<ol start="8">
<li>Papaya</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
39.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Good morning! (b) Cricket is fun. (c) The red kite -
40.📱 The screen is 700px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 1024px) {
p {
font-size: 18px;
}
} (a) Yes (b) No
Answer key
- 6
- background-color
- F
- white
- A tiger asleep
- False
- a class selector
- Cricket is fun.
- blue
- 4
- src
- True
- line 2
- <a>
- src
- <main>
- False
- .note
- True
- 6
- 5
- if
- False
- red
- Visit the site
- picks a day
- False
- <img>
- 1
- Our school trip
- colours behind the text
- the text or picture
- False
- 1
- flex-end
- </strong>
- opens it in a new tab
- 10
- The red kite
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids