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 pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 2.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
-
3.🔍 Which line is missing its closing tag?
line 1: <h3>My pets</h3>
line 2: <p>Good morning!
line 3: <small>Cricket is fun.</small> (a) line 3 (b) line 1 (c) line 2 - 4.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
5.⚖️ What colour is the text of this element?
<p class="big" id="top">Hi</p>
CSS:
#top { color: red; }
#top { color: purple; } (a) green (b) orange (c) purple (d) red - 6.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
- 7.Which of these is a strong password? (a) riya2014 (b) iloveyou (c) abcd1234 (d) S0lar!Pen#8
- 8.📱 max-width: 600px applies when the screen is ___. (a) 600px or wider (b) 600px or narrower (c) turned off (d) exactly 1000px
- 9.🔍 Which is the odd one out? (a) stores a website’s files (b) turns HTML into a page (c) hosts websites online (d) sends pages over the net
-
10.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 50px;
padding: 25px;
border: 5px solid black;
margin: 0px;
} - 11.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) makes it harder (b) helps everyone
- 12.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) script.js (c) index.html
-
13.♿ Is this heading order correct (no level skipped)?
<h1> → <h2> → <h2> → <h2> (a) Yes (b) No - 14.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
-
15.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) A happy dog (b) cake.jpg (c) Birthday cake (d) width - 16.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) style.css (d) script.js
-
17.🔁 How many times does this code print “Hello”?
for (let i = 2; i < 7; i++) {
console.log("Hello");
} - 18.🚀 Which file is best for the colours and fonts? (a) style.css (b) index.html (c) script.js (d) photo.jpg
- 19.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it loads faster (c) it adds pictures (d) it tells its meaning
- 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “plan what to show”? (a) plan what to show (b) write the HTML
- 21.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <input> (d) <p>
-
22.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Banana</td><td>Papaya</td><td>Mango</td><td>Banana</td></tr>
<tr><td>Orange</td><td>Papaya</td><td>Mango</td><td>Litchi</td></tr>
</table> - 23.🎯 Which element does the selector #intro style? (a) <div id="main"> (b) <span class="red"> (c) <div class="intro"> (d) <div id="intro">
- 24.Which of these is a strong password? (a) Rain#Drop_42! (b) riya2014 (c) qwerty (d) 111111
- 25.🛡️ Online: is it safe to use a strong password? (a) safe (b) not safe
- 26.What does justify-content: flex-end 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
- 27.True or false: HTML on its own can add up two numbers. (a) True (b) False
-
28.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<i>Cricket is fun.
<small>My best friend</small> (a) </h1> (b) </i> (c) </strong> (d) </small> - 29.Which of these is a closing tag? (a) <title> (b) </title> (c) <p> (d) <li>
-
30.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) Our school trip (b) Hello, world! (c) Good morning! (d) My pets - 31.🔁 Which word runs code only when something is true? (a) log (b) for (c) let (d) if
- 32.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
- 33.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h5>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
- 34.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the address bar (d) in the console
- 35.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
- 36.True or false: JavaScript gives the page structure. (a) False (b) True
-
37.⚡ What does this code show?
let name = "Meera";
alert("Hello, " + name + "!"); (a) Meera (b) Hello, Meera! (c) name (d) Hello, name! - 38.💪 Which flexbox property lines boxes up across? (a) display: flex (b) align-items (c) flex-direction (d) gap
-
39.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="date">
<input type="submit" value="Send">
</form> - 40.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
Answer key
- 100
- <
- line 2
- in the head
- purple
- 1
- S0lar!Pen#8
- 600px or narrower
- turns HTML into a page
- 110
- helps everyone
- script.js
- Yes
- an id selector
- Birthday cake
- script.js
- 5
- style.css
- it tells its meaning
- plan what to show
- <textarea>
- 4
- <div id="intro">
- Rain#Drop_42!
- safe
- packs boxes at the end
- False
- </i>
- </title>
- Our school trip
- if
- alt
- <h6>
- in the console
- <h6>
- False
- Hello, Meera!
- align-items
- 3
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids