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 many rows does this table have?
<table>
<tr><td>Guava</td><td>Grapes</td><td>Mango</td></tr>
<tr><td>Papaya</td><td>Guava</td><td>Papaya</td></tr>
</table> - 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 3.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) HyperText (d) High Tech
-
4.🔁 How many times does this code print “Hi”?
for (let i = 3; i <= 12; i++) {
console.log("Hi");
} - 5.True or false: the URL scrambles data on its way. (a) True (b) False
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Easy snacks (c) Space Facts (d) Thanks for visiting. - 7.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h5>
- 8.⚖️ Which selector is the weakest? (a) an id selector (b) an element selector (c) a class selector
- 9.📦 In the box model, which part is the text or picture? (a) padding (b) margin (c) content (d) border
- 10.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-end (c) flex-start (d) center
-
11.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>Hello, world!</h2>
<p>Hello, world!</p>
<h2>The red kite</h2>
<h2>My best friend</h2>
<h2>Cricket is fun.</h2> - 12.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .css (c) .jpg (d) .html
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon - 14.⚡ Where does console.log() show its output? (a) in the address bar (b) in the console (c) on the printer (d) on the title bar
-
15.🔁 What does this code print?
let score = 17;
if (score > 38) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 16.What is <input type="password"> for? (a) takes only numbers (b) is for one line of words (c) sends the form (d) hides what you type
- 17.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
-
18.🌍 What is the domain name in this URL?
http://www.example.net/games/chess.html (a) learn.example.com (b) /games/chess.html (c) www.example.net (d) http -
19.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 120px;
padding: 25px;
border: 2px solid black;
margin: 0px;
} - 20.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
-
21.⚡ What number does this code print?
let books = 27;
books = books + 11;
books = books - 15;
console.log(books); - 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 23.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Laptop (d) Line
- 24.What does text-align do? (a) colours behind the text (b) makes letters bigger (c) centres a heading (d) picks the font style
-
25.🔁 What does this code print?
let score = 36;
if (score >= 39) {
console.log("You win");
} else {
console.log("Play again");
} (a) You win (b) Play again - 26.🚀 Which file should this code go in: body { margin: 0; } (a) script.js (b) style.css (c) index.html
- 27.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
28.🎯 Which CSS selector matches this element?
<h2 class="box" id="top">Hello</h2> (a) li (b) .star (c) #box (d) h2 - 29.True or false: in <img>, alt describes the picture. (a) True (b) False
- 30.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
- 31.True or false: HTML on its own can make headings. (a) False (b) True
- 32.♿ Does this help everyone, or make the page harder to use: label every form box? (a) makes it harder (b) helps everyone
- 33.📝 Which tag gives a form box a name you can click? (a) <label> (b) <h1> (c) <title> (d) <hr>
- 34.🎯 Which element does the selector .note style? (a) <h2 class="big"> (b) <h2 class="note"> (c) <li class="red"> (d) <h2 id="note">
- 35.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
- 36.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 37.⚡ Which JavaScript word writes in the console? (a) console.log() (b) let (c) alert() (d) for
- 38.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
- 39.♿ Does this help everyone, or make the page harder to use: use headings in order? (a) helps everyone (b) makes it harder
- 40.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- 2
- Yes
- HyperText
- 10
- False
- Space Facts
- <h1>
- an element selector
- content
- flex-start
- 2
- .js
- A happy dog
- in the console
- Play again
- hides what you type
- src
- www.example.net
- 174
- Yes
- 23
- 3
- Language
- centres a heading
- Play again
- style.css
- a closing tag
- h2
- True
- a code editor
- True
- helps everyone
- <label>
- <h2 class="note">
- <h6>
- an empty tag
- console.log()
- weak
- helps everyone
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids