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 value is given to background-color in this rule?
body {
font-size: 20px;
background-color: yellow;
text-align: center;
} (a) 8px (b) background-color (c) yellow (d) 10px - 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) width (d) src
-
3.📊 How many rows does this table have?
<table>
<tr><td>Papaya</td><td>Grapes</td><td>Guava</td><td>Guava</td></tr>
<tr><td>Orange</td><td>Guava</td><td>Banana</td><td>Guava</td></tr>
<tr><td>Orange</td><td>Banana</td><td>Grapes</td><td>Litchi</td></tr>
</table> - 4.Which of these is an opening tag? (a) </p> (b) </h1> (c) <h1> (d) </b>
- 5.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) if (d) for
-
6.🌍 What is the protocol in this URL?
http://www.example.net/news/today.html (a) /news/today.html (b) www.example.net (c) http (d) https - 7.What is <input type="checkbox"> for? (a) sends the form (b) hides what you type (c) is for one line of words (d) lets you tick many
-
8.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 60px;
padding: 5px;
border: 2px solid black;
margin: 0px;
} -
9.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Rivers flow</p> -
10.✍️ How many declarations (property: value pairs) are in this rule?
.note {
color: red;
} - 11.🔁 Which word runs code only when something is true? (a) log (b) let (c) if (d) for
-
12.🌍 What is the path in this URL?
http://learn.example.com/about.html (a) learn.example.com (b) /about.html (c) /maths/tables.html (d) http -
13.🌍 What is the protocol in this URL?
http://learn.example.com/games/chess.html (a) /games/chess.html (b) learn.example.com (c) http (d) https - 14.Which of these is a strong password? (a) Mango#Kite29! (b) riya2014 (c) password (d) 123456
- 15.What is <input type="text"> for? (a) lets you pick only one (b) is for one line of words (c) is for an email address (d) takes only numbers
- 16.🔁 When does the else part run? (a) when if is false (b) when if is true (c) always (d) never
- 17.Which of these is the content? (a) space inside the border (b) the text or picture (c) a solid or dotted edge (d) the gap to other boxes
-
18.⚡ What number does this code print?
let a = 5;
let b = 2;
console.log(a - b); - 19.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
-
20.📱 The screen is 540px wide. Does the rule inside @media apply?
p {
font-size: 20px;
}
@media (max-width: 1024px) {
p {
font-size: 18px;
}
} (a) Yes (b) No - 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 22.⚡ Which word makes a new variable? (a) give (b) make (c) let (d) put
- 23.🚀 Where in index.html does the link to style.css go? (a) inside a <p> (b) in the footer (c) after </html> (d) in the head
- 24.True or false: a code editor hosts websites online. (a) False (b) True
- 25.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser asks it (b) DNS finds the server (c) the browser shows it (d) the server sends files
- 26.Which of these is an empty tag? (a) <title> (b) <meta> (c) <ul> (d) <p>
- 27.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 28.✍️ Which sign ends each CSS declaration? (a) , (b) . (c) ; (d) :
- 29.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h6> (b) <h3> (c) <h4> (d) <h5>
- 30.📊 Which tag makes a heading cell? (a) <table> (b) <caption> (c) <th> (d) <tr>
-
31.🔒 Is the connection to this address scrambled (encrypted)?
http://learn.example.com/games/chess.html (a) No (b) Yes - 32.True or false: <input type="submit"> sends the form. (a) True (b) False
- 33.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 34.🔍 Which is the odd one out? (a) puts a picture on a page (b) makes headings and lists (c) shows a pop-up message (d) gives the page structure
- 35.True or false: <li> shows bullet points. (a) True (b) False
- 36.📱 What does a media query check? (a) the screen width (b) the page title (c) the battery level (d) the time of day
- 37.What does justify-content: flex-end do? (a) packs boxes at the end (b) equal gaps, none at ends (c) packs boxes at the start (d) puts boxes in the middle
- 38.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
- 39.Which of these is a weak password? (a) 123456 (b) S0lar!Pen#8 (c) Mango#Kite29! (d) Chai$Cup_19x
-
40.♿ Is this heading order correct (no level skipped)?
<h1> → <h1> → <h2> → <h2> (a) Yes (b) No
Answer key
- yellow
- alt
- 3
- <h1>
- for
- http
- lets you tick many
- 74
- 3
- 1
- if
- /about.html
- http
- Mango#Kite29!
- is for one line of words
- when if is false
- the text or picture
- 3
- an id selector
- Yes
- <ol>
- let
- in the head
- False
- DNS finds the server
- <meta>
- No
- ;
- <h3>
- <th>
- No
- True
- 71
- shows a pop-up message
- False
- the screen width
- packs boxes at the end
- style.css
- 123456
- Yes
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids