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.Which of these is safe to do online? (a) post your home address (b) share your password (c) ask before downloading (d) put secrets in comments
- 2.✍️ In color: blue; which part is the value? (a) color (b) blue (c) : (d) ;
- 3.📱 What does a media query check? (a) the time of day (b) the page title (c) the battery level (d) the screen width
- 4.Which of these is true of a web browser? (a) is where we type code (b) saves our .html files (c) colours code to help us (d) turns HTML into a page
-
5.✍️ Which property is set to 2px solid in this rule?
.box {
font-size: 20px;
border: 2px solid;
} (a) width (b) 2px solid (c) font-style (d) border -
6.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<p>My best friend</p>
<p>My pets</p> - 7.True or false: the border is space outside the border. (a) True (b) False
-
8.🌍 What is the protocol in this URL?
http://learn.example.com/index.html (a) learn.example.com (b) /index.html (c) https (d) http - 9.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) exactly 100px (c) turned off (d) 800px or wider
- 10.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) white (c) red (d) bright green
- 11.Which of these is not safe to do online? (a) log out on shared PCs (b) post your home address (c) use a strong password (d) ask before downloading
-
12.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Cricket is fun.</h4>
<p>Cricket is fun.</p>
<p>My pets</p>
<h4>Our school trip</h4> - 13.True or false: in <img>, src names the picture file. (a) False (b) True
- 14.True or false: <h1> goes in the head. (a) False (b) True
-
15.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 1024px) {
p {
font-size: 8px;
}
} - 16.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3/> (d) <h3>
-
17.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) Play games (b) https://example.com (c) contact.html (d) maths.html - 18.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) black (d) white
- 19.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
- 20.True or false: in <img>, height sets how tall it is. (a) False (b) True
- 21.🎯 Can many elements share the same class? (a) Yes (b) No
- 22.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <footer> (c) <nav> (d) <main>
- 23.🎯 What kind of selector is body? (a) a class selector (b) an element selector (c) an id selector
-
24.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>My pets</h2>
<h2>My pets</h2> -
25.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 600px) {
p {
font-size: 18px;
}
} -
26.🎯 Which CSS selector matches this element?
<h1 class="big" id="main">Hello</h1> (a) .red (b) h2 (c) .big (d) #big -
27.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> --> - 28.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ffff
- 29.Which of these is a closing tag? (a) </title> (b) <li> (c) <b> (d) <p>
-
30.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (max-width: 768px) {
p {
font-size: 14px;
}
} - 31.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
-
32.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
p {
font-size: 24px;
}
@media (max-width: 1024px) {
p {
font-size: 20px;
}
} - 33.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
- 34.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) red (d) white
-
35.✍️ What value is given to margin in this rule?
#top {
font-style: italic;
margin: 10px;
width: 300px;
} (a) 10px (b) margin (c) 8px (d) bold - 36.True or false: the content is space outside the border. (a) True (b) False
- 37.Which of these is true of <aside>? (a) holds the logo and title (b) holds one blog post (c) holds a side box of tips (d) sits at the bottom
- 38.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
- 39.True or false: in <img>, height names the picture file. (a) True (b) False
- 40.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
Answer key
- ask before downloading
- blue
- the screen width
- turns HTML into a page
- border
- 4
- False
- http
- 800px or wider
- bright green
- post your home address
- 3
- True
- False
- 8
- </h3>
- contact.html
- black
- <a href="about.html">
- True
- Yes
- <footer>
- an element selector
- 1
- 18
- .big
- 1
- #00ffff
- </title>
- 14
- </h2>
- 20
- <!--
- white
- 10px
- False
- holds a side box of tips
- <h5>
- False
- the later one
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids