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 does font-weight do? (a) makes the text bold (b) makes letters bigger (c) centres a heading (d) sets the letter colour
-
2.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) School news (c) Take the quiz (d) games.html -
3.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="fruit"> Mango
<input type="checkbox" name="fruit"> Papaya
<input type="checkbox" name="fruit"> Guava
</form> - 4.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <table> (d) <style>
- 5.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) black
-
6.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) maths.html (b) https://example.com (c) Art corner (d) contact.html - 7.🧩 Which language adds space around boxes? (a) CSS (b) JavaScript (c) HTML
- 8.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <ul> (d) <p>
- 9.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False
- 10.📝 Which input type sends the form? (a) email (b) password (c) radio (d) submit
-
11.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 190px;
padding: 15px;
border: 2px solid black;
margin: 20px;
} - 12.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) notes.txt (c) script.js (d) index.html
- 13.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
-
14.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Hockey
<input type="radio" name="sport"> Cricket
<input type="radio" name="sport"> Kabaddi
</form> -
15.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 3; i++) {
total = total + 2;
}
console.log(total); - 16.Which of these is padding? (a) the gap to other boxes (b) space inside the border (c) the line round the box (d) the text or picture
-
17.📊 How many cells does this table have in all?
<table>
<tr><td>Litchi</td><td>Banana</td></tr>
<tr><td>Banana</td><td>Guava</td></tr>
</table> - 18.📦 In the box model, which part is a solid or dotted edge? (a) content (b) padding (c) border (d) margin
-
19.🔍 Which line is missing its closing tag?
line 1: <h3>My pets
line 2: <small>Hello, world!</small>
line 3: <h2>The red kite</h2> (a) line 1 (b) line 3 (c) line 2 - 20.Which of these is padding? (a) the gap to other boxes (b) the gap round content (c) the line round the box (d) a solid or dotted edge
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 22.Which of these is not safe to do online? (a) tell a trusted adult (b) check for https first (c) log out on shared PCs (d) type a password on http
-
23.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p> -
24.🖌️ What colour are the letters?
h1 {
color: yellow;
text-align: center;
background-color: white;
font-size: 12px;
} (a) white (b) black (c) yellow - 25.✍️ In color: blue; which part is the property? (a) ; (b) blue (c) color (d) :
- 26.True or false: <p> is an empty tag. (a) True (b) False
- 27.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 28.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 29.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) neither (d) the first one
- 30.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) ; (d) .
- 31.True or false: body { margin: 0; } goes in style.css. (a) True (b) False
- 32.Which of these is an opening tag? (a) </li> (b) </p> (c) </body> (d) <p>
- 33.📊 Which tag makes a heading cell? (a) <td> (b) <table> (c) <th> (d) <caption>
-
34.⚖️ What colour is the text of this element?
<p class="menu" id="top">Hi</p>
CSS:
#top { color: blue; }
.menu { color: red; }
p { color: black; } (a) red (b) black (c) blue (d) green -
35.✍️ How many declarations (property: value pairs) are in this rule?
#top {
background-color: yellow;
border: 2px solid;
width: 300px;
padding: 8px;
} - 36.🚀 Which file should this code go in: <img src="cat.png"> (a) index.html (b) style.css (c) script.js
-
37.⚖️ What colour is the text of this element?
<h2 class="note" id="top">Hi</h2>
CSS:
#top { color: white; }
#top { color: black; } (a) white (b) black (c) green (d) orange - 38.🔍 Which is the odd one out? (a) changes the page live (b) puts a picture on a page (c) reacts to a button click (d) checks a quiz answer
- 39.True or false: <h1> has a closing tag. (a) False (b) True
-
40.🔗 Where does this link open?
<a href="contact.html">Contact us</a> (a) in the same tab (b) in a new tab
Answer key
- makes the text bold
- School news
- 3
- <table>
- cyan
- contact.html
- CSS
- <li>
- False
- submit
- 264
- script.js
- -->
- 1
- 6
- space inside the border
- 4
- border
- line 1
- the gap round content
- red
- type a password on http
- 3
- yellow
- color
- False
- in the head
- <ol>
- the later one
- ;
- True
- <p>
- <th>
- blue
- 4
- index.html
- black
- puts a picture on a page
- True
- in the same tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids