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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
2.⚖️ What colour is the text of this element?
<h2 class="red" id="logo">Hi</h2>
CSS:
.red { color: yellow; }
.red { color: orange; } (a) yellow (b) purple (c) blue (d) orange - 3.Which of these is an empty tag? (a) <b> (b) <h1> (c) <title> (d) <hr>
- 4.🔢 To build and share your first web page, what comes right after “add CSS styles”? (a) plan what to show (b) publish it online (c) write the HTML (d) test in a browser
- 5.Which of these is margin? (a) space inside the border (b) the text or picture (c) the line round the box (d) space outside the border
- 6.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <body>
-
7.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 70px;
padding: 15px;
border: 4px solid black;
margin: 5px;
} - 8.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) hides the link (d) opens it in a new tab
- 9.What does justify-content: center do? (a) packs boxes at the end (b) puts boxes in the middle (c) packs boxes at the start (d) equal gaps, none at ends
- 10.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </body> (c) </html> (d) <body>
-
11.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="sport"> Kabaddi
<input type="radio" name="sport"> Chess
<input type="radio" name="sport"> Hockey
<input type="radio" name="sport"> Football
<input type="radio" name="sport"> Cricket
</form> -
12.💪 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 50px wide (no margins). - 13.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<header>”? (a) <main> (b) <header>
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite - 15.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 16.💪 Which flexbox property lines boxes up across? (a) display: flex (b) flex-direction (c) align-items (d) justify-content
- 17.🎯 Which element does the selector #intro style? (a) <li class="note"> (b) <h2 id="main"> (c) <h2 class="intro"> (d) <h2 id="intro">
- 18.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
- 19.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
- 20.♿ Who uses a screen reader? (a) people who are blind (b) only robots (c) only coders (d) only teachers
- 21.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the viewport meta tag (c) the hr tag (d) the title tag
-
22.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) contact.html (c) School news (d) https://example.com - 23.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) bright green (d) black
-
24.🔗 Where does this link open?
<a href="games.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 25.🌈 Which colour is #ffffff? (a) white (b) magenta (c) bright green (d) yellow
- 26.True or false: <input type="number"> takes only numbers. (a) False (b) True
-
27.🔗 Which address opens when you click this link?
<a href="quiz.html">Visit the site</a> (a) games.html (b) quiz.html (c) about.html (d) Visit the site -
28.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="date">
<input type="submit" value="Send">
</form> - 29.📦 In the box model, which part is the text or picture? (a) content (b) border (c) padding (d) margin
-
30.⚡ What number does this code print?
let books = 13;
books = books + 18;
books = books - 16;
console.log(books); -
31.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> -
32.🔁 How many times does this code print “Hello”?
for (let i = 3; i < 12; i++) {
console.log("Hello");
} -
33.🖌️ Where does the text sit on its line?
p {
color: purple;
font-size: 12px;
background-color: red;
text-align: left;
} (a) on the left (b) on the right (c) in the middle - 34.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
- 35.Which of these is a strong password? (a) iloveyou (b) 111111 (c) Blue@Tiger_74 (d) riya2014
-
36.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> (a) Fun facts (b) The red kite (c) Rain today -
37.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) quiz.html (b) href (c) Play games (d) About us - 38.🌈 Which colour is #ff0000? (a) red (b) magenta (c) bright green (d) blue
- 39.Which of these is an opening tag? (a) </b> (b) </body> (c) <li> (d) </p>
- 40.🛡️ Online: is it safe to log out on shared PCs? (a) not safe (b) safe
Answer key
- No
- orange
- <hr>
- test in a browser
- space outside the border
- <body>
- 108
- opens it in a new tab
- puts boxes in the middle
- </html>
- 1
- 10
- <header>
- A tiger asleep
- an empty tag
- align-items
- <h2 id="intro">
- <h1>
- <!DOCTYPE html>
- people who are blind
- the viewport meta tag
- contact.html
- black
- in a new tab
- white
- True
- quiz.html
- 3
- content
- 15
- 3
- 9
- on the left
- <ol>
- Blue@Tiger_74
- Rain today
- Play games
- red
- <li>
- safe
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids