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 attribute holds the address of a link? (a) alt (b) src (c) id (d) href
- 2.True or false: <main> helps you move around. (a) False (b) True
- 3.What does text-align do? (a) picks the font style (b) sets the letter colour (c) centres a heading (d) colours behind the text
-
4.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> --> - 5.Which of these goes in the body? (a) <h1> (b) <link rel="stylesheet"> (c) <title> (d) <meta charset="utf-8">
- 6.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 7.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
-
8.🖌️ What colour are the letters?
p {
font-size: 40px;
color: black;
text-align: right;
background-color: red;
} (a) green (b) red (c) black - 9.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 10.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the later one (d) the first one
- 11.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
- 12.🚀 Which file should this code go in: p { color: red; } (a) style.css (b) index.html (c) script.js
- 13.🚀 Which file should this code go in: .box { padding: 8px; } (a) script.js (b) index.html (c) style.css
-
14.🖌️ What colour is behind the letters?
li {
text-align: right;
color: white;
background-color: black;
font-size: 16px;
} (a) white (b) black (c) yellow - 15.🎨 Which tag connects an outside CSS file? (a) <css> (b) <img> (c) <a> (d) <link>
- 16.Which of these goes in the body? (a) <title> (b) <img> (c) <style> (d) <meta charset="utf-8">
- 17.True or false: <a href="a.html">Go</a> goes in index.html. (a) False (b) True
- 18.True or false: <ul><li>Art</li></ul> goes in index.html. (a) False (b) True
- 19.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
-
20.⚡ What does this code show?
let name = "Aman";
console.log("Welcome, " + name + "!"); (a) name (b) Aman (c) Welcome, Aman! (d) Welcome, name! - 21.💪 Which justify-content value packs boxes at the start? (a) center (b) flex-start (c) space-between (d) flex-end
- 22.True or false: #main is an id selector. (a) True (b) False
-
23.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> -
24.✍️ How many declarations (property: value pairs) are in this rule?
p {
margin: 10px;
border: 2px solid;
width: 300px;
font-weight: bold;
} - 25.🎯 Which element does the selector #main style? (a) <span id="logo"> (b) <p class="menu"> (c) <span class="main"> (d) <span id="main">
- 26.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
- 27.🔍 Which is the odd one out? (a) gives the page structure (b) makes headings and lists (c) sets colours and fonts (d) puts a picture on a page
- 28.Which of these is true of <footer>? (a) holds a side box of tips (b) sits at the bottom (c) holds the logo and title (d) holds the menu of links
-
29.🔍 One closing tag is missing. Which one?
<strong>The red kite</strong>
<b>Hello, world!
<i>Rain today</i> (a) </strong> (b) </u> (c) </i> (d) </b> -
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: 12px;
}
} -
31.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus - 32.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
-
33.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in a new tab (b) in the same tab - 34.🔍 Which is the odd one out? (a) counts down a timer (b) changes the page live (c) makes a form box (d) reacts to a button click
-
35.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) about.html - 36.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
-
37.✍️ How many declarations (property: value pairs) are in this rule?
.note {
color: red;
padding: 8px;
font-style: italic;
} - 38.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) makes it harder (b) helps everyone
-
39.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<!-- <p>Our school trip</p> --> -
40.📊 How many cells are in each row?
<table>
<tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
<tr><td>Litchi</td><td>Litchi</td><td>Orange</td><td>Jamun</td></tr>
<tr><td>Banana</td><td>Grapes</td><td>Jamun</td><td>Litchi</td></tr>
<tr><td>Mango</td><td>Banana</td><td>Mango</td><td>Jamun</td></tr>
</table>
Answer key
- href
- False
- centres a heading
- 2
- <h1>
- <a>
- an attribute
- black
- No
- the later one
- height
- style.css
- style.css
- black
- <link>
- <img>
- True
- True
- 51
- Welcome, Aman!
- flex-start
- True
- 350
- 4
- <span id="main">
- 6
- sets colours and fonts
- sits at the bottom
- </b>
- 12
- bus.jpg
- <a href="about.html">
- in the same tab
- makes a form box
- Take the quiz
- in the body
- 3
- makes it harder
- 1
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids