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.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 2.⚡ Where does console.log() show its output? (a) in the address bar (b) on the printer (c) in the console (d) on the title bar
-
3.🖌️ What colour are the letters?
p {
text-align: left;
color: red;
background-color: black;
font-size: 28px;
} (a) red (b) black (c) blue -
4.🖌️ What colour are the letters?
h2 {
text-align: right;
font-size: 40px;
background-color: red;
color: orange;
} (a) red (b) yellow (c) orange -
5.✍️ What is the selector in this CSS rule?
h1 {
border: 2px solid;
font-weight: bold;
background-color: yellow;
} (a) p (b) bold (c) h1 (d) border -
6.🔗 Where does this link open?
<a href="news.html">Art corner</a> (a) in the same tab (b) in a new tab - 7.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) </html> (d) <body>
-
8.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> -
9.🔁 What number does this code print?
let total = 0;
for (let i = 1; i <= 4; i++) {
total = total + 5;
}
console.log(total); - 10.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
-
11.🔒 Is the connection to this address scrambled (encrypted)?
https://www.example.net/games/chess.html (a) Yes (b) No - 12.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
- 13.🧩 Which language adds space around boxes? (a) CSS (b) JavaScript (c) HTML
- 14.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
15.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> - 16.Which of these is the border? (a) the gap to other boxes (b) space outside the border (c) the line round the box (d) space inside the border
- 17.What does font-family do? (a) makes the text bold (b) picks the font style (c) sets the letter colour (d) makes letters bigger
- 18.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) height (d) src
-
19.⚖️ What colour is the text of this element?
<p class="menu" id="end">Hi</p>
CSS:
#end { color: white; }
#end { color: red; } (a) green (b) orange (c) white (d) red - 20.💪 Which justify-content value packs boxes at the end? (a) center (b) space-between (c) flex-end (d) flex-start
- 21.Which of these is a closing tag? (a) <li> (b) <h1> (c) </body> (d) <p>
-
22.💪 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 40px wide (no margins). - 23.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
-
24.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) news.html (b) art.html (c) Maths fun (d) quiz.html - 25.📊 Which tag holds the whole table? (a) <td> (b) <caption> (c) <table> (d) <tr>
- 26.📊 In a table, which tag is a row? (a) <th> (b) <tb> (c) <td> (d) <tr>
-
27.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab -
28.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 29.True or false: <img src="cat.png"> goes in index.html. (a) False (b) True
- 30.Which of these is an opening tag? (a) <b> (b) </h1> (c) </li> (d) </title>
- 31.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
- 32.🚀 What is the home page file of a website usually called? (a) main.png (b) start.js (c) index.html (d) home.css
- 33.Which of these is the content? (a) the gap to other boxes (b) the text or picture (c) the gap round content (d) space inside the border
- 34.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
- 35.True or false: in <img>, width describes the picture. (a) False (b) True
- 36.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
- 37.🌍 Which one sends the page back? (a) the URL (b) the browser (c) HTTPS (d) the server
-
38.⚡ What does this code print? (Look at the quotes!)
let x = "6";
let y = 9;
console.log(x + y); (a) 15 (b) Error (c) 69 - 39.True or false: CSS reacts to a button click. (a) True (b) False
- 40.📝 Which input type hides what you type? (a) text (b) password (c) email (d) date
Answer key
- Yes
- in the console
- red
- orange
- h1
- in the same tab
- </html>
- 2
- 20
- opens it in a new tab
- Yes
- <h2>
- CSS
- in the body
- 3
- the line round the box
- picks the font style
- src
- red
- flex-end
- </body>
- 30
- padding
- art.html
- <table>
- <tr>
- in a new tab
- numbers
- True
- <b>
- <
- index.html
- the text or picture
- False
- False
- <!DOCTYPE html>
- the server
- 69
- False
- password
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids