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.💬 Does the browser show comments on the page? (a) No (b) Yes
-
2.⚖️ What colour is the text of this element?
<h1 class="star" id="top">Hi</h1>
CSS:
.star { color: black; }
#top { color: orange; }
h1 { color: green; } (a) black (b) orange (c) purple (d) green - 3.🌈 Which hex code is yellow? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #000000
- 4.🖌️ Which CSS property sets the letter colour? (a) text-align (b) font-family (c) color (d) font-weight
- 5.📄 Where does the text of <title> appear? (a) at the bottom (b) on the browser tab (c) in a big heading (d) nowhere
-
6.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>The red kite</h2>
<h2>Hello, world!</h2> - 7.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 8.What is <input type="password"> for? (a) lets you pick only one (b) sends the form (c) hides what you type (d) takes only numbers
- 9.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 10.🧭 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
- 11.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
-
12.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 13.🎯 Which element does the selector .red style? (a) <div class="star"> (b) <li class="red"> (c) <li class="box"> (d) <li id="red">
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> -
15.📱 The screen is 320px wide. Does the rule inside @media apply?
p {
font-size: 16px;
}
@media (max-width: 1024px) {
p {
font-size: 12px;
}
} (a) No (b) Yes - 16.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <body> (b) <html>
- 17.🔐 Is abcd1234 a strong or a weak password? (a) weak (b) strong
- 18.Which of these is not safe to do online? (a) use a strong password (b) share your password (c) log out on shared PCs (d) check for https first
- 19.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) style.css (b) index.html (c) script.js
- 20.🎨 Which attribute adds CSS inside one tag? (a) alt (b) style (c) href (d) src
- 21.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) add CSS styles (c) publish it online (d) test in a browser
- 22.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
-
23.🎯 Which CSS selector matches this element?
<h2 class="star" id="logo">Hello</h2> (a) .menu (b) li (c) #star (d) h2 -
24.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>My best friend</p> -->
<p>The red kite</p> (a) Cricket is fun. (b) Good morning! (c) My best friend (d) The red kite - 25.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Colourful Site Styles (c) Creative Sheet System (d) Cascading Style Sheets
- 26.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #ff0000 (d) #ff00ff
- 27.✍️ In color: blue; which part is the value? (a) : (b) ; (c) blue (d) color
- 28.📊 In a table, which tag is a row? (a) <th> (b) <tb> (c) <td> (d) <tr>
- 29.True or false: .box { padding: 8px; } goes in index.html. (a) True (b) False
- 30.True or false: in <img>, alt describes the picture. (a) True (b) False
- 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 32.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
- 33.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </head> (c) </body> (d) <!DOCTYPE html>
- 34.True or false: <li> has a closing tag. (a) True (b) False
- 35.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
- 36.What does background-color do? (a) sets the letter colour (b) makes the text bold (c) makes letters bigger (d) colours behind the text
-
37.🖌️ What colour is behind the letters?
h2 {
color: blue;
text-align: left;
background-color: red;
font-size: 36px;
} (a) green (b) blue (c) red - 38.True or false: in <img>, alt names the picture file. (a) True (b) False
- 39.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
40.✍️ How many declarations (property: value pairs) are in this rule?
.note {
font-style: italic;
}
Answer key
- No
- orange
- #ffff00
- color
- on the browser tab
- 1
- an opening tag
- hides what you type
- No
- it tells its meaning
- <h1>
- 350
- <li class="red">
- 100
- Yes
- <html>
- weak
- share your password
- style.css
- style
- write the HTML
- a web browser
- h2
- My best friend
- Cascading Style Sheets
- #00ffff
- blue
- <tr>
- False
- True
- <!DOCTYPE html>
- <ol>
- <!DOCTYPE html>
- True
- a line across the page
- colours behind the text
- red
- False
- <ol>
- 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids