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.What is <input type="text"> for? (a) hides what you type (b) takes only numbers (c) lets you tick many (d) is for one line of words
-
2.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) href (b) Contact us (c) contact.html (d) Visit the site - 3.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
- 4.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
- 5.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading
- 6.🚀 Which file should this code go in: #top { color: blue; } (a) script.js (b) style.css (c) index.html
- 7.🔁 What does i++ do? (a) doubles i (b) prints i (c) takes 1 from i (d) adds 1 to i
- 8.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
- 9.True or false: HTML on its own can count button clicks. (a) False (b) True
-
10.✍️ Which property is set to 2px solid in this rule?
p {
border: 2px solid;
margin: 10px;
font-style: italic;
} (a) 2px solid (b) font-style (c) border (d) width - 11.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
12.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> --> - 13.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
- 14.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) shows pages from the web (d) shows line numbers
- 15.Which colour pair is easy to read? (a) red on green (b) blue on purple (c) pink on red (d) white on black
- 16.📝 Which input type lets you tick many? (a) submit (b) date (c) password (d) checkbox
- 17.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
- 18.📦 In the box model, which part is the line round the box? (a) margin (b) border (c) content (d) padding
- 19.What is <input type="submit"> for? (a) lets you pick only one (b) sends the form (c) hides what you type (d) lets you tick many
- 20.📊 Which tag gives the table a title? (a) <caption> (b) <table> (c) <tr> (d) <th>
-
21.⚖️ What colour is the text of this element?
<p class="big" id="end">Hi</p>
CSS:
#end { color: black; }
#end { color: red; } (a) orange (b) green (c) black (d) red -
22.🖌️ Where does the text sit on its line?
p {
color: red;
background-color: orange;
text-align: right;
font-size: 16px;
} (a) on the left (b) on the right (c) in the middle - 23.True or false: to use a nickname in games is not safe. (a) True (b) False
-
24.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 90px;
padding: 30px;
border: 3px solid black;
margin: 0px;
} -
25.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 26.Which of these is true of <header>? (a) holds the logo and title (b) holds copyright notes (c) holds extra side notes (d) helps you move around
- 27.True or false: <tr> makes one data cell. (a) False (b) True
- 28.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
- 29.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
-
30.⚡ What does this code print? (Look at the quotes!)
let x = "1";
let y = 4;
console.log(x + y); (a) Error (b) 5 (c) 14 - 31.What does justify-content: space-between do? (a) packs boxes at the end (b) equal gaps, none at ends (c) packs boxes at the start (d) puts boxes in the middle
-
32.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 24px;
}
@media (min-width: 768px) {
p {
font-size: 26px;
}
} (a) Yes (b) No -
33.🖌️ What colour are the letters?
p {
font-size: 20px;
text-align: left;
color: white;
background-color: purple;
} (a) red (b) purple (c) white - 34.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
-
35.📋 What number does the browser show next to “Grapes”?
<ol start="5">
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Litchi</li>
</ol> -
36.🌍 What is the protocol in this URL?
https://learn.example.com/art/gallery.html (a) /art/gallery.html (b) learn.example.com (c) https (d) http - 37.Which of these goes in the head? (a) <table> (b) <p> (c) <style> (d) <a>
- 38.True or false: <li> is an ordered list. (a) True (b) False
-
39.🎯 Which CSS selector matches this element?
<span class="big" id="logo">Hello</span> (a) span (b) .red (c) #big (d) p - 40.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
Answer key
- is for one line of words
- Contact us
- starts a new line
- <h1>
- on the browser tab
- style.css
- adds 1 to i
- <h1>
- False
- border
- True
- 1
- the body
- shows line numbers
- white on black
- checkbox
- src
- border
- sends the form
- <caption>
- red
- on the right
- False
- 156
- bullets
- holds the logo and title
- False
- <h1>
- <!DOCTYPE html>
- 14
- equal gaps, none at ends
- No
- white
- <h2>
- 6
- https
- <style>
- False
- span
- <a>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids