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 attribute of <img> describes the picture? (a) alt (b) src (c) height (d) width
- 2.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) <!DOCTYPE html> (d) <html>
- 3.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) in the head (c) in the footer (d) inside a <p>
-
4.⚡ What does this code print? (Look at the quotes!)
let x = "4";
let y = 2;
console.log(x + y); (a) Error (b) 42 (c) 6 -
5.🎯 Which CSS selector matches this element?
<span class="menu" id="hero">Hello</span> (a) .hero (b) .menu (c) p (d) .note -
6.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 18px;
}
} - 7.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) alt (c) height (d) src
- 8.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 9.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
- 10.🌗 Is blue on purple easy or hard to read? (a) hard to read (b) easy to read
-
11.🌍 What is the domain name in this URL?
https://www.example.net/index.html (a) learn.example.com (b) /index.html (c) https (d) www.example.net - 12.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
- 13.🌗 Is white on black easy or hard to read? (a) hard to read (b) easy to read
- 14.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) alt (d) height
- 15.🌈 Which colour is #ff00ff? (a) blue (b) white (c) black (d) magenta
- 16.📊 Which tag makes one data cell? (a) <td> (b) <tr> (c) <caption> (d) <th>
- 17.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) High Tech (d) Home Text
-
18.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 200px;
padding: 10px;
border: 4px solid black;
margin: 15px;
} - 19.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 20.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
- 21.🌍 Which one stores the site’s files? (a) the browser (b) the server (c) HTTPS (d) the URL
-
22.⚡ What does this code print? (Look at the quotes!)
let x = "4";
let y = 9;
console.log(x + y); (a) 13 (b) 49 (c) Error - 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
- 24.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <nav> (b) <header> (c) <footer>
- 25.💪 Which flexbox property lines boxes up across? (a) flex-direction (b) align-items (c) justify-content (d) gap
-
26.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) href (c) Visit the site (d) Maths fun - 27.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
- 28.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
- 29.🌍 Which one shows the page to you? (a) the browser (b) HTTPS (c) the server (d) the URL
- 30.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
- 31.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 32.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
- 33.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 34.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 35.Which of these is true of a web server? (a) hosts websites online (b) turns HTML into a page (c) shows line numbers (d) opens web pages for us
- 36.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 37.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
-
38.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) href (b) About us (c) Contact us (d) about.html -
39.✍️ How many declarations (property: value pairs) are in this rule?
body {
padding: 8px;
text-align: center;
} - 40.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
Answer key
- alt
- <!DOCTYPE html>
- in the head
- 42
- .menu
- 18
- width
- a closing tag
- #
- hard to read
- www.example.net
- <!DOCTYPE html>
- easy to read
- src
- magenta
- <td>
- HyperText
- 258
- True
- <h1>
- the server
- 49
- <h1>
- <footer>
- align-items
- Visit the site
- <li>
- <h6>
- the browser
- No
- red
- in the head
- Yes
- True
- hosts websites online
- in the body
- 66
- About us
- 2
- a web server
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids