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 colour is the text of this element?
<p class="star" id="hero">Hi</p>
CSS:
.star { color: red; }
.star { color: orange; } (a) red (b) blue (c) orange (d) white - 2.🛡️ Online: is it safe to tell a trusted adult? (a) not safe (b) safe
-
3.📊 How many rows does this table have?
<table>
<tr><td>Guava</td><td>Banana</td></tr>
<tr><td>Orange</td><td>Orange</td></tr>
</table> - 4.✍️ Which sign ends each CSS declaration? (a) , (b) . (c) ; (d) :
- 5.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
-
6.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 80px;
padding: 25px;
border: 4px solid black;
margin: 10px;
} -
7.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) Play games (b) href (c) quiz.html (d) About us -
8.⚖️ What colour is the text of this element?
<h1 class="star" id="end">Hi</h1>
CSS:
#end { color: white; }
#end { color: red; } (a) red (b) black (c) purple (d) white -
9.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> - 10.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) for (d) if
- 11.True or false: CSS rounds box corners. (a) False (b) True
- 12.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 13.🔁 Which word runs code only when something is true? (a) log (b) for (c) let (d) if
-
14.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="colour"> Red
<input type="checkbox" name="colour"> Pink
<input type="checkbox" name="colour"> Blue
<input type="checkbox" name="colour"> Orange
</form> - 15.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A red kite (c) width (d) A tiger asleep - 17.✍️ How does a CSS comment start? (a) // (b) <!-- (c) # (d) /*
- 18.📦 In the box model, which part is space outside the border? (a) border (b) padding (c) margin (d) content
- 19.🧩 Which language gives the page structure? (a) JavaScript (b) CSS (c) HTML
-
20.⚡ What number does this code print?
let a = 3;
let b = 11;
console.log(a * b); - 21.⚖️ Which selector is the weakest? (a) an element selector (b) an id selector (c) a class selector
-
22.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 60px;
padding: 5px;
border: 5px solid black;
margin: 10px;
} - 23.Which of these is a closing tag? (a) <body> (b) <b> (c) </b> (d) <h1>
- 24.💪 Which flexbox property sets space between boxes? (a) display: flex (b) flex-direction (c) align-items (d) gap
- 25.True or false: in <img>, src sets how tall it is. (a) False (b) True
- 26.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
-
27.⚖️ What colour is the text of this element?
<p class="menu" id="main">Hi</p>
CSS:
p { color: blue; }
p { color: red; } (a) yellow (b) red (c) blue (d) orange - 28.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
-
29.🔗 Which address opens when you click this link?
<a href="news.html">Take the quiz</a> (a) Take the quiz (b) games.html (c) news.html (d) quiz.html -
30.⚖️ What colour is the text of this element?
<h1 class="box" id="intro">Hi</h1>
CSS:
#intro { color: orange; }
#intro { color: red; } (a) red (b) orange (c) purple (d) green -
31.🖌️ Where does the text sit on its line?
p {
background-color: black;
text-align: center;
font-size: 20px;
color: red;
} (a) on the left (b) in the middle (c) on the right -
32.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>The red kite</p>
<p>My pets</p> - 33.Which of these is an opening tag? (a) </p> (b) <b> (c) </title> (d) </li>
-
34.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> - 35.📊 In a table, which tag is a row? (a) <td> (b) <th> (c) <tb> (d) <tr>
- 36.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
-
37.🔗 Which address opens when you click this link?
<a href="about.html">Contact us</a> (a) https://example.com (b) about.html (c) contact.html (d) Contact us - 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 39.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 40.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) stores a website’s files (d) has an address bar
Answer key
- orange
- safe
- 2
- ;
- <li>
- 158
- Play games
- red
- 3
- for
- True
- an empty tag
- if
- 4
- <ol>
- A tiger asleep
- /*
- margin
- HTML
- 33
- an element selector
- 80
- </b>
- gap
- False
- <h5>
- red
- <img>
- news.html
- red
- in the middle
- 3
- <b>
- 6
- <tr>
- Yes
- about.html
- No
- height
- has an address bar
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids