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.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
- 2.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
- 3.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
- 5.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 6.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
- 7.True or false: <ol> shows bullet points. (a) False (b) True
- 8.True or false: in <img>, alt is read by screen readers. (a) True (b) False
- 9.Which colour pair is easy to read? (a) blue on purple (b) yellow on white (c) red on green (d) black on white
- 10.True or false: HTML makes headings and lists. (a) True (b) False
- 11.🖌️ Which CSS property picks the font style? (a) color (b) font-weight (c) font-family (d) text-align
- 12.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 13.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
14.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="radio" name="fruit"> Papaya
<input type="radio" name="fruit"> Banana
<input type="radio" name="fruit"> Guava
<input type="radio" name="fruit"> Litchi
</form> - 15.True or false: in <img>, src sets how tall it is. (a) True (b) False
- 16.🌍 What does a web address (URL) tell the browser? (a) your password (b) how old you are (c) the page colour (d) where the page is
-
17.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h4>Good morning!</h4>
<h2>Hello, world!</h2> - 18.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
- 19.🔗 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
-
20.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png - 21.Which of these goes in the head? (a) <h1> (b) <title> (c) <img> (d) <ul>
- 22.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) script.js (d) style.css
-
23.✍️ What value is given to border in this rule?
h2 {
font-weight: bold;
padding: 8px;
border: 2px solid;
} (a) italic (b) border (c) 300px (d) 2px solid - 24.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
- 25.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) . (d) ;
- 26.🎯 Which element does the selector #intro style? (a) <h2 class="intro"> (b) <li class="big"> (c) <h2 id="intro"> (d) <h2 id="main">
-
27.🔗 Where does this link open?
<a href="contact.html">Contact us</a> (a) in the same tab (b) in a new tab -
28.🔍 Which line is missing its closing tag?
line 1: <b>My pets</b>
line 2: <h3>I love mangoes.</h3>
line 3: <h2>Rain today (a) line 1 (b) line 3 (c) line 2 -
29.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 30.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
-
31.🖌️ What colour is behind the letters?
h1 {
background-color: orange;
color: yellow;
text-align: right;
font-size: 12px;
} (a) green (b) orange (c) yellow - 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 33.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 34.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 35.True or false: HTTPS shows the page to you. (a) False (b) True
- 36.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
- 37.Which of these is margin? (a) a solid or dotted edge (b) space inside the border (c) the line round the box (d) the gap to other boxes
- 38.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) opens web pages for us
-
39.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 90px;
padding: 25px;
border: 4px solid black;
margin: 20px;
} - 40.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .css (d) .png
Answer key
- when if is false
- a code editor
- has a closing tag
- <h2>
- to leave notes
- width
- False
- True
- black on white
- True
- font-family
- Yes
- -->
- 1
- False
- where the page is
- 3
- <a href="about.html">
- opens it in a new tab
- fort.jpg
- <title>
- script.js
- 2px solid
- index.html
- ;
- <h2 id="intro">
- in the same tab
- line 3
- in a new tab
- the later one
- orange
- a slash /
- No
- <ul>
- False
- <!--
- the gap to other boxes
- opens web pages for us
- 188
- .css
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids