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.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
-
2.🔁 How many times does this code print “Welcome”?
for (let i = 2; i < 6; i++) {
console.log("Welcome");
} -
3.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png - 4.Which of these is true of a web browser? (a) answers page requests (b) has an address bar (c) stores a website’s files (d) colours code to help us
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 6.♿ Which link text is clearest? (a) here (b) click here (c) Read the fruit facts (d) link
- 7.🚀 What is the home page file of a website usually called? (a) start.js (b) home.css (c) main.png (d) index.html
- 8.True or false: <aside> helps you move around. (a) True (b) False
-
9.⚖️ What colour is the text of this element?
<h2 class="star" id="end">Hi</h2>
CSS:
h2 { color: green; }
#end { color: black; } (a) black (b) yellow (c) white (d) green - 10.🌍 Which program shows a web page to us? (a) a music player (b) a calculator (c) a paint program (d) a web browser
- 11.Which of these is a closing tag? (a) <b> (b) <title> (c) <p> (d) </title>
-
12.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 140px;
padding: 25px;
border: 3px solid black;
margin: 10px;
} - 13.🌍 Which one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="150"> (a) width (b) kite.png (c) A red kite (d) Map of India - 15.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) width (c) A tiger asleep (d) A red kite -
17.⚡ What does this code print? (Look at the quotes!)
let x = "2";
let y = 4;
console.log(x + y); (a) 6 (b) 24 (c) Error -
18.⚡ What number does this code print?
let runs = 13;
runs = runs + 4;
runs = runs - 9;
console.log(runs); - 19.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 20.True or false: “write clear link text” helps everyone use the page. (a) False (b) True
- 21.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 22.📱 max-width: 600px applies when the screen is ___. (a) 600px or narrower (b) 600px or wider (c) turned off (d) exactly 1000px
- 23.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 24.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 25.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 26.Which of these is an empty tag? (a) <b> (b) <p> (c) <img> (d) <title>
- 27.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
- 28.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 29.What does justify-content: space-between 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
- 30.Which of these is not safe to do online? (a) use a nickname in games (b) use a strong password (c) meet an online stranger (d) think before you post
-
31.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) Space Facts (b) Mars is red. (c) My drawings (d) index.html - 32.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 33.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
- 34.Which of these is true of <aside>? (a) is the page’s key part (b) holds a side box of tips (c) holds the logo and title (d) helps you move around
- 35.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
-
36.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 210px;
padding: 20px;
border: 1px solid black;
margin: 0px;
} - 37.✍️ In color: blue; which part is the property? (a) blue (b) color (c) ; (d) :
- 38.Which of these has a closing tag? (a) <li> (b) <img> (c) <hr> (d) <meta>
- 39.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
- 40.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
Answer key
- <h2>
- 4
- dog.jpg
- has an address bar
- 255
- Read the fruit facts
- index.html
- False
- black
- a web browser
- </title>
- 216
- the URL
- A red kite
- False
- A tiger asleep
- 24
- 8
- <!DOCTYPE html>
- True
- a closing tag
- 600px or narrower
- Yes
- Yes
- an opening tag
- <img>
- on the browser tab
- <ul>
- equal gaps, none at ends
- meet an online stranger
- Space Facts
- <!--
- </p>
- holds a side box of tips
- starts a new line
- 252
- color
- <li>
- src
- <html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids