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 colour is #ffff00? (a) bright green (b) magenta (c) red (d) yellow
- 2.🧭 Which semantic tag helps you move around? (a) <header> (b) <footer> (c) <main> (d) <nav>
-
3.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 110px;
padding: 25px;
border: 3px solid black;
margin: 15px;
} -
4.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 150px;
padding: 20px;
border: 3px solid black;
margin: 20px;
} -
5.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) contact.html (c) Contact us (d) games.html -
6.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Sky is blue</p> - 7.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <nav> (c) <footer> (d) <header>
-
8.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p> - 9.True or false: <ol> is an ordered list. (a) False (b) True
- 10.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 11.What does justify-content: space-between do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the start (d) packs boxes at the end
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="300"> - 13.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
- 14.True or false: a code editor answers page requests. (a) True (b) False
- 15.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) style.css (c) script.js
-
16.🖌️ Where does the text sit on its line?
h1 {
text-align: right;
color: orange;
background-color: yellow;
font-size: 20px;
} (a) in the middle (b) on the left (c) on the right -
17.🔍 One closing tag is missing. Which one?
<i>Rain today</i>
<h2>The red kite</h2>
<b>Cricket is fun. (a) </b> (b) </i> (c) </p> (d) </h2> - 18.True or false: <header> holds the logo and title. (a) True (b) False
- 19.True or false: p is an element selector. (a) False (b) True
- 20.🔢 To build and share your first web page, which comes LAST? (a) publish it online (b) plan what to show (c) add CSS styles (d) test in a browser
- 21.True or false: a web browser stores a website’s files. (a) True (b) False
- 22.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
- 23.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
- 24.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
- 25.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 26.What is <input type="email"> for? (a) picks a day (b) is for an email address (c) takes only numbers (d) is for one line of words
- 27.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
- 28.True or false: alert("Hi"); goes in script.js. (a) False (b) True
-
29.✍️ What value is given to font-weight in this rule?
p {
padding: 8px;
font-style: italic;
font-weight: bold;
} (a) font-weight (b) bold (c) 300px (d) 2px solid -
30.📊 How many cells does this table have in all?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Orange</td><td>Grapes</td><td>Papaya</td><td>Grapes</td></tr>
<tr><td>Jamun</td><td>Guava</td><td>Orange</td><td>Jamun</td></tr>
<tr><td>Jamun</td><td>Grapes</td><td>Litchi</td><td>Papaya</td></tr>
</table> -
31.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My pets</p> (a) Cricket is fun. (b) Good morning! (c) My pets - 32.💪 Which flexbox property lines boxes up across? (a) display: flex (b) gap (c) flex-direction (d) align-items
-
33.✍️ How many declarations (property: value pairs) are in this rule?
body {
background-color: yellow;
text-align: center;
font-size: 20px;
} - 34.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 35.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
36.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="300"> (a) bus.jpg (b) moon.png (c) The full moon (d) fort.jpg -
37.🔁 How many times does this code print “Hi”?
for (let i = 1; i < 8; i++) {
console.log("Hi");
} -
38.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="250"> (a) width (b) Map of India (c) A red kite (d) kite.png - 39.🎯 Which element does the selector .note style? (a) <p class="red"> (b) <span id="note"> (c) <span class="note"> (d) <span class="big">
-
40.🖌️ How big is the text, in px?
li {
background-color: green;
text-align: right;
color: blue;
font-size: 12px;
}
Answer key
- yellow
- <nav>
- 166
- 236
- games.html
- 3
- <footer>
- 3
- True
- href
- equal gaps, none at ends
- 300
- on the browser tab
- False
- style.css
- on the right
- </b>
- True
- True
- publish it online
- False
- makes it harder
- -->
- <a href="about.html">
- an opening tag
- is for an email address
- an element selector
- True
- bold
- 16
- Cricket is fun.
- align-items
- 3
- <a>
- in the head
- moon.png
- 7
- A red kite
- <span class="note">
- 12
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids