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.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
-
2.🔍 Which line is missing its closing tag?
line 1: <small>Fun facts
line 2: <i>I love mangoes.</i>
line 3: <em>Our school trip</em> (a) line 1 (b) line 2 (c) line 3 -
3.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 120px;
padding: 10px;
border: 2px solid black;
margin: 20px;
} - 4.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
-
5.🔁 How many times does this code print “Hello”?
for (let i = 0; i < 8; i++) {
console.log("Hello");
} - 6.True or false: .menu is a class selector. (a) False (b) True
-
7.🌍 What is the domain name in this URL?
https://learn.example.com/maths/tables.html (a) https (b) /maths/tables.html (c) www.example.com (d) learn.example.com -
8.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) bullets (b) numbers -
9.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
p {
font-size: 20px;
}
@media (min-width: 1024px) {
p {
font-size: 22px;
}
} -
10.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>The red kite</p> - 11.⚡ What does JavaScript add to a web page? (a) the page title (b) the domain name (c) actions and changes (d) only colours
- 12.True or false: li is an element selector. (a) False (b) True
-
13.🔗 Where does this link open?
<a href="news.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 14.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
- 15.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <body> (b) <html>
- 16.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
- 17.🧩 Which language changes the page live? (a) JavaScript (b) HTML (c) CSS
- 18.🔁 When does the else part run? (a) when if is false (b) always (c) never (d) when if is true
- 19.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
20.🔁 What does this code print?
let score = 3;
if (score > 42) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again -
21.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Kites fly high</p> - 22.📊 Which tag gives the table a title? (a) <caption> (b) <tr> (c) <table> (d) <th>
- 23.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
- 24.What does font-size do? (a) centres a heading (b) makes the text bold (c) sets the letter colour (d) makes letters bigger
- 25.True or false: the browser is the page’s address. (a) False (b) True
- 26.Which colour pair is easy to read? (a) light grey on white (b) black on white (c) yellow on white (d) blue on purple
- 27.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) . (d) ;
-
28.🔒 Is the connection to this address scrambled (encrypted)?
http://www.example.net/news/today.html (a) No (b) Yes - 29.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
-
30.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<p>My best friend</p>
<p>Fun facts</p> (a) Fun facts (b) The red kite (c) My pets (d) My best friend - 31.True or false: “tiny grey text” helps everyone use the page. (a) False (b) True
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) magenta (c) black (d) cyan
- 33.🔍 Which is the odd one out? (a) shows line numbers (b) sends pages over the net (c) stores a website’s files (d) hosts websites online
-
34.📝 How many <input> tags are in this form?
<form>
<input type="date">
<input type="email">
<input type="submit" value="Send">
</form> - 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
- 36.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) flex-end (c) space-between (d) center
- 37.⚡ What does alert() show? (a) a table (b) a new tab (c) a pop-up box (d) a picture
- 38.⚡ Which word makes a new variable? (a) give (b) let (c) make (d) put
- 39.Which of these is true of a web server? (a) sends pages over the net (b) opens web pages for us (c) has an address bar (d) colours code to help us
-
40.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 340px;
justify-content: center;
}
Inside are 4 boxes, each 60px wide (no margins).
Answer key
- <h2>
- line 1
- 184
- <a>
- 8
- True
- learn.example.com
- bullets
- 20
- 4
- actions and changes
- True
- in a new tab
- strong
- <html>
- to describe the image
- JavaScript
- when if is false
- <ol>
- Play again
- 3
- <caption>
- <h5>
- makes letters bigger
- False
- black on white
- ;
- No
- semantic
- The red kite
- False
- cyan
- shows line numbers
- 3
- as one space
- center
- a pop-up box
- let
- sends pages over the net
- 50
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids