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.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
-
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) body (c) Cricket Club (d) My drawings -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) width (c) map.png (d) Map of India - 4.What does text-align do? (a) colours behind the text (b) makes letters bigger (c) picks the font style (d) centres a heading
- 5.True or false: <ol> lists steps in order. (a) False (b) True
-
6.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) The red kite (b) Our school trip (c) I love mangoes. (d) My pets - 7.Which of these does HTML do? (a) sets colours and fonts (b) counts down a timer (c) gives the page structure (d) shows a pop-up message
- 8.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) red (d) cyan
-
9.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="300"> - 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 11.True or false: the browser shows the page to you. (a) True (b) False
- 12.True or false: #main is an element selector. (a) False (b) True
-
13.💪 How much empty space (px) is left after the last box?
.row {
display: flex;
width: 170px;
justify-content: flex-start;
}
Inside are 3 boxes, each 40px wide (no margins). - 14.⚡ Which tag holds JavaScript in a page? (a) <style> (b) <code> (c) <script> (d) <js>
- 15.🎯 Which element does the selector h2 style? (a) <span id="logo"> (b) <div class="red"> (c) <li> (d) <h2 class="red">
- 16.True or false: alert(score); goes in style.css. (a) True (b) False
- 17.📝 Which tag gives a form box a name you can click? (a) <title> (b) <h1> (c) <label> (d) <hr>
-
18.🖌️ Where does the text sit on its line?
p {
background-color: blue;
font-size: 32px;
text-align: right;
color: white;
} (a) on the left (b) in the middle (c) on the right - 19.Which of these is a closing tag? (a) </b> (b) <title> (c) <b> (d) <body>
-
20.⚖️ What colour is the text of this element?
<h1 class="note" id="logo">Hi</h1>
CSS:
h1 { color: green; }
h1 { color: yellow; } (a) yellow (b) white (c) green (d) purple -
21.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>Our school trip</p> - 22.🧩 Which language rounds box corners? (a) JavaScript (b) HTML (c) CSS
-
23.⚖️ What colour is the text of this element?
<h2 class="star" id="main">Hi</h2>
CSS:
h2 { color: yellow; }
h2 { color: orange; } (a) yellow (b) red (c) white (d) orange -
24.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
</ol> - 25.⚡ Which word makes a new variable? (a) give (b) let (c) put (d) make
- 26.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
-
27.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> -
28.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>Good morning!</h2>
<p>My best friend</p> - 29.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
- 31.📊 Which tag holds the whole table? (a) <td> (b) <tr> (c) <table> (d) <caption>
-
32.🔁 What is the LAST number this code prints?
for (let i = 0; i < 5; i = i + 2) {
console.log(i);
} - 33.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <html> (c) </body> (d) <!DOCTYPE html>
-
34.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 140px;
padding: 25px;
border: 2px solid black;
margin: 15px;
} -
35.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
.box {
width: 190px;
padding: 20px;
border: 1px solid black;
margin: 0px;
} - 36.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
- 37.✍️ In color: blue; which part is the value? (a) : (b) ; (c) blue (d) color
- 38.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
- 39.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 40.True or false: <img> goes in the head. (a) False (b) True
Answer key
- <!--
- My drawings
- Map of India
- centres a heading
- True
- Our school trip
- gives the page structure
- magenta
- 300
- 255
- True
- False
- 50
- <script>
- <h2 class="red">
- False
- <label>
- on the right
- </b>
- yellow
- 2
- CSS
- orange
- 2
- let
- <a>
- 150
- 2
- a closing tag
- <h1>
- <table>
- 4
- <!DOCTYPE html>
- 224
- 232
- an id selector
- blue
- False
- an opening tag
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids