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: HTML puts a picture on a page. (a) False (b) True
-
2.🎯 Which CSS selector matches this element?
<li class="big" id="top">Hello</li> (a) .red (b) div (c) #intro (d) li - 3.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) inside a <p> (c) in the head (d) in the footer
- 4.🌍 Which one sends the page back? (a) the URL (b) the browser (c) HTTPS (d) the server
- 5.📊 Which tag makes one table row? (a) <td> (b) <table> (c) <tr> (d) <caption>
- 6.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
- 7.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
-
8.⚖️ What colour is the text of this element?
<p class="box" id="intro">Hi</p>
CSS:
p { color: blue; }
p { color: yellow; } (a) blue (b) orange (c) yellow (d) purple - 9.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width - 11.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
- 12.🎯 What kind of selector is h1? (a) an element selector (b) a class selector (c) an id selector
-
13.🌍 What is the domain name in this URL?
https://kids.example.org/art/gallery.html (a) kids.example.org (b) /art/gallery.html (c) https (d) school.example.in - 14.💬 Does the browser show comments on the page? (a) No (b) Yes
- 15.Which of these is a closing tag? (a) <body> (b) <p> (c) <title> (d) </li>
-
16.🔒 Is the connection to this address scrambled (encrypted)?
http://school.example.in/art/gallery.html (a) Yes (b) No -
17.🌍 What is the protocol in this URL?
https://school.example.in/about.html (a) https (b) school.example.in (c) http (d) /about.html -
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) moon.png (b) Our school bus (c) width (d) The full moon - 19.📝 What does a password box show instead of letters? (a) dots (b) emojis (c) numbers (d) capital letters
- 20.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <head> (d) <!DOCTYPE html>
- 21.🔁 What does i++ do? (a) doubles i (b) adds 1 to i (c) prints i (d) takes 1 from i
-
22.⚡ What does this code print? (Look at the quotes!)
let x = "2";
let y = 3;
console.log(x + y); (a) 23 (b) 5 (c) Error - 23.🛡️ Online: is it safe to share your OTP? (a) safe (b) not safe
- 24.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <li> (c) inside the <head> (d) inside a <tr>
- 25.Which of these does HTML do? (a) rounds box corners (b) adds space around boxes (c) makes a form box (d) lays out the page
- 26.⚡ What does JavaScript add to a web page? (a) only colours (b) the page title (c) actions and changes (d) the domain name
- 27.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 28.True or false: in <img>, width shows if the image fails. (a) True (b) False
- 29.🧭 Which semantic tag sits at the very top? (a) <article> (b) <header> (c) <footer> (d) <nav>
- 30.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
- 31.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
-
32.✍️ What is the selector in this CSS rule?
#top {
font-size: 20px;
margin: 10px;
font-weight: bold;
} (a) 10px (b) #top (c) font-size (d) li - 33.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 34.⚡ Which JavaScript word writes in the console? (a) let (b) alert() (c) console.log() (d) for
-
35.✍️ What is the selector in this CSS rule?
body {
background-color: yellow;
text-align: center;
font-style: italic;
} (a) center (b) background-color (c) body (d) .box - 36.Which of these has a closing tag? (a) <meta> (b) <p> (c) <img> (d) <input>
- 37.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) width (d) src
-
38.📊 How many rows does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Papaya</td><td>Mango</td></tr>
<tr><td>Mango</td><td>Banana</td></tr>
</table> -
39.🔒 Is the connection to this address scrambled (encrypted)?
https://learn.example.com/maths/tables.html (a) Yes (b) No -
40.🔁 What does this code print?
let marks = 7;
if (marks >= 17) {
console.log("Pass");
} else {
console.log("Try again");
} (a) Try again (b) Pass
Answer key
- True
- li
- in the head
- the server
- <tr>
- <a href="about.html">
- <
- yellow
- a closing tag
- Birthday cake
- 1
- an element selector
- kids.example.org
- No
- </li>
- No
- https
- The full moon
- dots
- <!DOCTYPE html>
- adds 1 to i
- 23
- not safe
- inside a <tr>
- makes a form box
- actions and changes
- Yes
- False
- <header>
- opens it in a new tab
- <h6>
- #top
- red
- console.log()
- body
- <p>
- alt
- 4
- Yes
- Try again
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids