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?
<h1 class="note" id="logo">Hi</h1>
CSS:
h1 { color: red; }
h1 { color: white; } (a) purple (b) white (c) orange (d) red - 2.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
- 3.🧩 Which language makes a form box? (a) JavaScript (b) CSS (c) HTML
- 4.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 5.What is <input type="email"> for? (a) sends the form (b) lets you pick only one (c) is for one line of words (d) is for an email address
- 6.True or false: the browser stores the site’s files. (a) False (b) True
-
7.🔁 How many numbers does this code print?
for (let i = 0; i < 19; i = i + 3) {
console.log(i);
} - 8.📱 Responsive design means a page ___. (a) has no pictures (b) is only for laptops (c) fits every screen (d) never changes
- 9.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-start (c) flex-end (d) center
- 10.📊 Which tag makes one table row? (a) <caption> (b) <th> (c) <tr> (d) <table>
-
11.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="400"> - 12.🎯 Which element does the selector #logo style? (a) <span class="logo"> (b) <p class="box"> (c) <span id="logo"> (d) <span id="end">
- 13.🎯 Can many elements share the same class? (a) No (b) Yes
- 14.What does font-size do? (a) makes letters bigger (b) sets the letter colour (c) colours behind the text (d) makes the text bold
-
15.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<!-- <p>My pets</p> --> - 16.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
- 17.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
- 18.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
- 19.Which of these is margin? (a) a solid or dotted edge (b) the line round the box (c) space inside the border (d) the gap to other boxes
- 20.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 21.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
- 22.💪 Which justify-content value packs boxes at the end? (a) space-between (b) flex-end (c) flex-start (d) center
- 23.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 24.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
-
25.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) index.html (c) Match report (d) Cricket Club - 26.True or false: <table> makes one table row. (a) True (b) False
-
27.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <i>Rain today</i>
line 3: <u>My best friend</u> (a) line 1 (b) line 2 (c) line 3 - 28.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<header>”? (a) <nav> (b) <header>
- 29.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
-
30.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="text">
<input type="date">
<input type="email">
<input type="checkbox">
<input type="submit" value="Send">
</form> - 31.True or false: score = score + 1; goes in script.js. (a) True (b) False
- 32.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
- 33.What is <input type="submit"> for? (a) sends the form (b) hides what you type (c) lets you pick only one (d) takes only numbers
- 34.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
- 35.True or false: <li> is one item of a list. (a) True (b) False
- 36.🎯 Which element does the selector h2 style? (a) <span id="intro"> (b) <h2 class="box"> (c) <div class="box"> (d) <li>
- 37.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
-
38.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Sky is blue</p> -
39.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 7; i++) {
total = total + 5;
}
console.log(total); -
40.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 120px;
justify-content: flex-start;
}
Inside are 2 boxes, each 40px wide (no margins).
Answer key
- white
- 6
- HTML
- an opening tag
- is for an email address
- False
- 7
- fits every screen
- flex-start
- <tr>
- 400
- <span id="logo">
- Yes
- makes letters bigger
- 2
- strong
- href
- 78
- the gap to other boxes
- Yes
- opens it in a new tab
- flex-end
- False
- to leave notes
- Cricket Club
- False
- line 1
- <header>
- <h1>
- 6
- True
- True
- sends the form
- turns HTML into a page
- True
- <h2 class="box">
- <li>
- 3
- 35
- 40
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids