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.True or false: <p>Hello!</p> goes in script.js. (a) False (b) True
-
2.⚖️ What colour is the text of this element?
<h2 class="menu" id="logo">Hi</h2>
CSS:
#logo { color: red; }
.menu { color: green; } (a) yellow (b) red (c) green (d) orange - 3.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the later one (c) the shorter one (d) the first one
-
4.📱 The screen is 820px wide. Does the rule inside @media apply?
p {
font-size: 12px;
}
@media (min-width: 480px) {
p {
font-size: 14px;
}
} (a) No (b) Yes - 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
- 6.True or false: <title> goes in the body. (a) True (b) False
-
7.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="100"> (a) width (b) kite.png (c) Map of India (d) A red kite - 8.📝 Which tag makes a drop-down list? (a) <li> (b) <ol> (c) <select> (d) <ul>
-
9.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
10.📦 How much space top to bottom (px) does this box take in all, margin included?
.box {
height: 80px;
padding: 5px;
border: 4px solid black;
margin: 15px;
} - 11.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 12.💬 How does an HTML comment end? (a) >> (b) --> (c) // (d) */
- 13.🎯 Which sign starts an id selector? (a) @ (b) # (c) & (d) .
-
14.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Riya’s Recipes (b) index.html (c) Mars is red. (d) Planets - 15.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <title>
-
16.🖌️ What colour are the letters?
h1 {
background-color: red;
font-size: 28px;
text-align: left;
color: yellow;
} (a) red (b) purple (c) yellow -
17.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<h2>Good morning!</h2>
<h2>My pets</h2>
<p>Good morning!</p> - 18.True or false: HTML on its own can make links to pages. (a) False (b) True
- 19.📄 Can HTML on its own make a form? (a) Yes (b) No
- 20.True or false: a code editor saves our .html files. (a) False (b) True
- 21.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) flex-start (d) center
- 22.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
- 23.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
- 24.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 25.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 26.📊 Which tag makes one table row? (a) <td> (b) <tr> (c) <caption> (d) <table>
-
27.📊 How many heading cells (<th>) does this table have?
<table>
<tr><th>Name</th><th>Fruit</th></tr>
<tr><td>Guava</td><td>Grapes</td></tr>
<tr><td>Banana</td><td>Grapes</td></tr>
<tr><td>Guava</td><td>Mango</td></tr>
</table> - 28.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) strong (b) weak
-
29.📋 What number does the browser show next to “Banana”?
<ol>
<li>Grapes</li>
<li>Banana</li>
<li>Jamun</li>
</ol> - 30.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) nobody (d) only the printer
-
31.⚡ What number does this code print?
let score = 26;
score = score + 16;
score = score - 6;
console.log(score); - 32.⚡ What does alert() show? (a) a new tab (b) a pop-up box (c) a table (d) a picture
- 33.True or false: console.log(5 + 2); goes in style.css. (a) False (b) True
- 34.📊 In a table, which tag is a row? (a) <tb> (b) <th> (c) <td> (d) <tr>
- 35.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
- 36.What does justify-content: space-between do? (a) puts boxes in the middle (b) packs boxes at the end (c) equal gaps, none at ends (d) packs boxes at the start
- 37.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it adds pictures (d) it makes text red
- 38.📝 Which input type sends the form? (a) password (b) number (c) email (d) submit
- 39.📱 What does a media query check? (a) the screen width (b) the page title (c) the time of day (d) the battery level
- 40.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
Answer key
- False
- red
- the later one
- Yes
- opens it in a new tab
- False
- A red kite
- <select>
- bullets
- 128
- <ol>
- -->
- #
- Riya’s Recipes
- <title>
- yellow
- 2
- True
- Yes
- True
- space-between
- <h2>
- </h2>
- in the body
- No
- <tr>
- 2
- strong
- 2
- screen-reader users
- 36
- a pop-up box
- False
- <tr>
- starts a new line
- equal gaps, none at ends
- it tells its meaning
- submit
- the screen width
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids