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.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (max-width: 600px) {
p {
font-size: 10px;
}
} - 2.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if
- 3.⚡ Which word makes a new variable? (a) let (b) make (c) put (d) give
-
4.🎯 Which CSS selector matches this element?
<h1 class="star" id="main">Hello</h1> (a) #star (b) h2 (c) .star (d) #logo - 5.True or false: <a> goes in the head. (a) True (b) False
- 6.True or false: the server asks for a web page. (a) False (b) True
- 7.True or false: <li> is one item of a list. (a) True (b) False
- 8.True or false: to use a strong password is safe. (a) False (b) True
- 9.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 10.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <h1>
- 11.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 12.📝 Which input type is for an email address? (a) password (b) number (c) text (d) email
-
13.⚖️ What colour is the text of this element?
<h1 class="box" id="logo">Hi</h1>
CSS:
#logo { color: red; }
.box { color: orange; } (a) purple (b) orange (c) white (d) red -
14.⚡ What number does this code print?
let a = 10;
let b = 2;
console.log(a * b); - 15.True or false: the content is a solid or dotted edge. (a) True (b) False
-
16.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="text">
<input type="checkbox">
<input type="date">
<input type="email">
<input type="submit" value="Send">
</form> - 17.🛡️ Online: is it safe to ask before downloading? (a) not safe (b) safe
- 18.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 1 (d) 5
-
19.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> - 20.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
- 21.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <link> (d) <img>
-
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: 120px;
padding: 20px;
border: 2px solid black;
margin: 15px;
} -
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My best friend</p>
<h2>Rain today</h2>
<h2>My best friend</h2> -
24.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> -->
<p>Good morning!</p> - 25.🎯 What kind of selector is .big? (a) an id selector (b) an element selector (c) a class selector
- 26.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
-
27.📝 How many <input> tags are in this form?
<form>
<input type="password">
<input type="checkbox">
<input type="submit" value="Send">
</form> - 28.🔍 Which is the odd one out? (a) changes the text size (b) makes a link (c) sets colours and fonts (d) lays out the page
- 29.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <table> (c) <meta charset="utf-8"> (d) <style>
-
30.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Hello, world!</h4>
<p>Our school trip</p> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) dog.jpg (b) The full moon (c) A happy dog (d) width - 32.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
- 33.♿ Which link text is clearest? (a) click here (b) Read the fruit facts (c) link (d) here
- 34.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
- 35.📊 In a table, which tag is a row? (a) <th> (b) <td> (c) <tr> (d) <tb>
- 36.Which of these does JavaScript do? (a) changes the page live (b) makes headings and lists (c) makes a link (d) sets colours and fonts
- 37.Which of these is an opening tag? (a) <title> (b) </li> (c) </b> (d) </p>
- 38.📄 Can HTML on its own count button clicks? (a) Yes (b) No
- 39.Which of these is a weak password? (a) Kite_Fl1es@Dawn (b) S0lar!Pen#8 (c) Blue@Tiger_74 (d) 111111
-
40.⚡ What does this code show?
let name = "Kabir";
console.log("Hello, " + name + "!"); (a) Kabir (b) Hello, name! (c) Hello, Kabir! (d) name
Answer key
- 12
- for
- let
- .star
- False
- False
- True
- True
- <h6>
- <h1>
- -->
- red
- 20
- False
- 6
- safe
- 1
- 2
- <ul>
- <link>
- 164
- 2
- 3
- a class selector
- True
- 3
- makes a link
- <table>
- 2
- A happy dog
- as one space
- Read the fruit facts
- hard to read
- <tr>
- changes the page live
- <title>
- No
- 111111
- Hello, Kabir!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids