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 of these is true of a web server? (a) opens web pages for us (b) answers page requests (c) is where we type code (d) shows pages from the web
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
-
3.🎯 Which CSS selector matches this element?
<p class="note" id="end">Hello</p> (a) .big (b) h1 (c) #note (d) .note -
4.⚖️ What colour is the text of this element?
<h2 class="menu" id="main">Hi</h2>
CSS:
.menu { color: blue; }
.menu { color: green; } (a) red (b) blue (c) orange (d) green - 5.📊 Which tag gives the table a title? (a) <tr> (b) <table> (c) <caption> (d) <th>
-
6.🔍 One closing tag is missing. Which one?
<h3>Our school trip
<small>Fun facts</small>
<h2>My pets</h2> (a) </h1> (b) </h3> (c) </small> (d) </h2> - 7.🧩 Which language gives the page structure? (a) JavaScript (b) HTML (c) CSS
- 8.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
-
10.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png -
11.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-style: italic;
} -
12.⚡ What does this code show?
let name = "Meera";
console.log("Hi, " + name + "!"); (a) name (b) Hi, Meera! (c) Hi, name! (d) Meera -
13.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Cricket is fun.</h4>
<p>My pets</p>
<p>Fun facts</p> -
14.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> (a) My pets (b) Rain today (c) Fun facts (d) The red kite - 15.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
- 16.Which of these is a strong password? (a) riya2014 (b) iloveyou (c) 123456 (d) Chai$Cup_19x
- 17.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
-
18.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) href (b) contact.html (c) Visit the site (d) Contact us -
19.⚖️ What colour is the text of this element?
<p class="box" id="main">Hi</p>
CSS:
#main { color: green; }
.box { color: blue; } (a) yellow (b) blue (c) purple (d) green - 20.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 21.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
-
22.⚡ What number does this code print?
let a = 55;
let b = 27;
console.log(a - b); - 23.⚡ Which word makes a new variable? (a) put (b) make (c) give (d) let
- 24.Which of these does HTML do? (a) rounds box corners (b) counts down a timer (c) changes the page live (d) makes a form box
- 25.What is <input type="email"> for? (a) lets you tick many (b) hides what you type (c) sends the form (d) is for an email address
-
26.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My best friend</p>
<h2>My best friend</h2>
<p>Fun facts</p> - 27.🎯 What kind of selector is #main? (a) an element selector (b) an id selector (c) a class selector
-
28.🔁 How many numbers does this code print?
for (let i = 0; i < 18; i = i + 3) {
console.log(i);
} - 29.True or false: <ul> lists steps in order. (a) False (b) True
- 30.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) stores a website’s files
- 31.Which of these goes in the head? (a) <p> (b) <meta charset="utf-8"> (c) <img> (d) <a>
-
32.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 110px;
justify-content: flex-start;
}
Inside are 2 boxes, each 40px wide (no margins). -
33.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Banana</li>
</ol> -
34.💪 How wide (px) is each gap between two boxes?
.row {
display: flex;
width: 240px;
justify-content: space-between;
}
Inside are 3 boxes, each 60px wide (no margins). - 35.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
-
36.✍️ How many declarations (property: value pairs) are in this rule?
body {
font-size: 20px;
background-color: yellow;
} - 37.🛡️ Online: is it safe to tell a trusted adult? (a) not safe (b) safe
-
38.⚖️ What colour is the text of this element?
<h2 class="big" id="logo">Hi</h2>
CSS:
#logo { color: blue; }
#logo { color: yellow; } (a) blue (b) green (c) yellow (d) purple - 39.True or false: <caption> makes one table row. (a) False (b) True
-
40.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
Answer key
- answers page requests
- red
- .note
- green
- <caption>
- </h3>
- HTML
- has a closing tag
- src
- dog.jpg
- 1
- Hi, Meera!
- 2
- Rain today
- <h6>
- Chai$Cup_19x
- True
- Contact us
- green
- False
- <ul>
- 28
- let
- makes a form box
- is for an email address
- 3
- an id selector
- 6
- False
- stores a website’s files
- <meta charset="utf-8">
- 30
- 2
- 30
- height
- 2
- safe
- yellow
- False
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids