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.True or false: in <img>, width sets how tall it is. (a) True (b) False
- 2.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <header> (c) <footer>
- 3.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes headings and lists (c) reacts to a button click (d) makes a form box
- 4.🛡️ Before typing a password on a site, check the address starts with ___. (a) http (b) www (c) ftp (d) https
-
5.🔁 How many times does this code print “Hello”?
for (let i = 2; i < 6; i++) {
console.log("Hello");
} -
6.🔍 Which line is missing its closing tag?
line 1: <small>My pets</small>
line 2: <em>Cricket is fun.</em>
line 3: <strong>Rain today (a) line 1 (b) line 3 (c) line 2 -
7.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 170px;
justify-content: space-between;
}
Inside are 2 boxes, each 60px wide (no margins). - 8.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
-
9.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>The red kite</p> --> (a) Our school trip (b) My best friend (c) The red kite - 10.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
-
11.🔁 What does this code print?
let temp = 17;
if (temp > 29) {
console.log("Hot");
} else {
console.log("Cool");
} (a) Hot (b) Cool - 12.True or false: <input type="email"> hides what you type. (a) True (b) False
- 13.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
- 14.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .html (c) .jpg (d) .css
-
15.📊 How many cells are in each row?
<table>
<tr><td>Papaya</td><td>Mango</td></tr>
<tr><td>Banana</td><td>Litchi</td></tr>
<tr><td>Mango</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Banana</td></tr>
</table> - 16.🎯 Which element does the selector h1 style? (a) <h1 class="star"> (b) <h2> (c) <div id="intro"> (d) <li class="star">
-
17.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> -
18.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<h2>My best friend</h2>
<p>The red kite</p> -
19.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
<tr><td>Mango</td><td>Mango</td><td>Papaya</td></tr>
</table> -
20.🔗 Where does this link open?
<a href="about.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab - 21.🧭 Which semantic tag holds a side box of tips? (a) <article> (b) <main> (c) <aside> (d) <nav>
-
22.📊 How many cells are in each row?
<table>
<tr><td>Banana</td><td>Orange</td></tr>
<tr><td>Banana</td><td>Jamun</td></tr>
<tr><td>Mango</td><td>Guava</td></tr>
<tr><td>Banana</td><td>Litchi</td></tr>
</table> - 23.True or false: a web server is where we type code. (a) False (b) True
- 24.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 25.🖌️ Which CSS property centres a heading? (a) font-weight (b) color (c) text-align (d) font-family
- 26.🌍 Which program shows a web page to us? (a) a music player (b) a paint program (c) a web browser (d) a calculator
-
27.⚡ What does this code show?
let name = "Arjun";
alert("Welcome, " + name + "!"); (a) name (b) Welcome, Arjun! (c) Welcome, name! (d) Arjun - 28.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
- 29.Which of these goes in the head? (a) <table> (b) <style> (c) <p> (d) <img>
-
30.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake - 31.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
- 32.Which of these is true of a code editor? (a) is where we type code (b) opens web pages for us (c) hosts websites online (d) answers page requests
- 33.🎯 Which element does the selector #main style? (a) <h1 class="main"> (b) <h2 class="box"> (c) <h1 id="main"> (d) <h1 id="logo">
-
34.🔗 Where does this link open?
<a href="https://example.com">Maths fun</a> (a) in the same tab (b) in a new tab -
35.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Papaya</td><td>Banana</td></tr>
</table> - 36.📊 Which tag gives the table a title? (a) <td> (b) <th> (c) <table> (d) <caption>
-
37.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 38.True or false: margin is space outside the border. (a) False (b) True
- 39.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 40.🔍 Which is the odd one out? (a) gives the page structure (b) puts a picture on a page (c) lays out the page (d) makes a form box
Answer key
- False
- <main>
- reacts to a button click
- https
- 4
- line 3
- 50
- </h1>
- The red kite
- the screen width
- Cool
- False
- an id selector
- .js
- 2
- <h1 class="star">
- 3
- 2
- 3
- in a new tab
- <aside>
- 2
- False
- <ul>
- text-align
- a web browser
- Welcome, Arjun!
- </u>
- <style>
- cake.jpg
- <h6>
- is where we type code
- <h1 id="main">
- in the same tab
- 2
- <caption>
- in a new tab
- True
- a closing tag
- lays out the page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids