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: 20px;
}
@media (min-width: 1024px) {
p {
font-size: 22px;
}
} -
2.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
p {
font-size: 16px;
}
@media (min-width: 768px) {
p {
font-size: 24px;
}
} -
3.⚡ What does this code show?
let name = "Aman";
alert("Welcome, " + name + "!"); (a) name (b) Aman (c) Welcome, Aman! (d) Welcome, name! - 4.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
- 5.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u> (c) <\u> (d) <u/>
- 6.True or false: <ul> shows bullet points. (a) False (b) True
- 7.✍️ CSS declarations go inside which brackets? (a) [ ] (b) ( ) (c) < > (d) { }
- 8.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
- 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 10.🔁 Which word runs code only when something is true? (a) let (b) for (c) log (d) if
- 11.Which of these does CSS do? (a) makes headings and lists (b) puts a picture on a page (c) checks a quiz answer (d) changes the text size
- 12.🌈 In #630000 the red part is the hex number 63. What is it as a normal number?
-
13.📋 What number does the browser show next to “Orange”?
<ol>
<li>Banana</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Jamun</li>
<li>Mango</li>
</ol> - 14.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) </head> (b) <html>
- 15.Which colour pair is hard to read? (a) black on white (b) yellow on black (c) red on green (d) dark grey on white
- 16.True or false: HTML changes the page live. (a) False (b) True
- 17.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 19.True or false: <img> goes in the body. (a) True (b) False
- 20.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
- 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
- 22.Which of these is the content? (a) the text or picture (b) space outside the border (c) the line round the box (d) the gap round content
-
23.🔁 How many times does this code print “Well done”?
for (let i = 0; i < 2; i++) {
console.log("Well done");
} - 24.True or false: <input type="checkbox"> lets you tick many. (a) False (b) True
- 25.⚡ Which JavaScript word repeats code? (a) console.log() (b) if (c) alert() (d) for
- 26.🔢 To build and share your first web page, which comes FIRST? (a) publish it online (b) test in a browser (c) plan what to show (d) add CSS styles
- 27.🌈 In #7a0000 the red part is the hex number 7a. What is it as a normal number?
- 28.True or false: a web server is where we type code. (a) False (b) True
- 29.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
-
30.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab -
31.🔁 How many times does this code print “Well done”?
for (let i = 2; i <= 11; i++) {
console.log("Well done");
} - 32.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
-
33.📊 How many cells are in each row?
<table>
<tr><td>Mango</td><td>Papaya</td><td>Guava</td><td>Grapes</td></tr>
<tr><td>Orange</td><td>Litchi</td><td>Orange</td><td>Mango</td></tr>
<tr><td>Guava</td><td>Banana</td><td>Banana</td><td>Litchi</td></tr>
<tr><td>Guava</td><td>Papaya</td><td>Papaya</td><td>Litchi</td></tr>
</table> - 34.🔢 To build and share your first web page, which comes first: “test in a browser” or “add CSS styles”? (a) test in a browser (b) add CSS styles
- 35.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 36.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
-
37.✍️ How many declarations (property: value pairs) are in this rule?
p {
font-weight: bold;
padding: 8px;
} - 38.True or false: <ul> is an ordered list. (a) True (b) False
- 39.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #0000ff
-
40.🖌️ What colour is behind the letters?
h2 {
font-size: 12px;
color: red;
background-color: white;
text-align: left;
} (a) green (b) white (c) red
Answer key
- 20
- 16
- Welcome, Aman!
- <!DOCTYPE html>
- </u>
- True
- { }
- <!--
- 1
- if
- changes the text size
- 99
- 3
- <html>
- red on green
- False
- <h1>
- red
- True
- to leave notes
- src
- the text or picture
- 2
- True
- for
- plan what to show
- 122
- False
- href
- in a new tab
- 10
- <a href="about.html">
- 4
- add CSS styles
- True
- <ul>
- 2
- False
- #0000ff
- white
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids