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.Which of these is true of <nav>? (a) sits at the very top (b) holds the menu of links (c) holds extra side notes (d) sits at the bottom
-
2.⚡ What does this code show?
let name = "Riya";
console.log("Welcome, " + name + "!"); (a) Riya (b) name (c) Welcome, Riya! (d) Welcome, name! -
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 4.🚀 Which file should this code go in: alert("Hi"); (a) style.css (b) index.html (c) script.js
- 5.💪 Which justify-content value packs boxes at the end? (a) space-between (b) flex-start (c) flex-end (d) center
-
6.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Fun facts</p>
<h4>Rain today</h4> - 7.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.🎯 Which element does the selector #intro style? (a) <p class="intro"> (b) <h1 class="note"> (c) <p id="intro"> (d) <p id="main">
-
9.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) bus.jpg (b) Our school bus (c) tiger.jpg (d) fort.jpg - 10.📦 In the box model, which part is the gap round content? (a) border (b) margin (c) content (d) padding
-
11.⚡ What number does this code print?
let a = 58;
let b = 7;
console.log(a + b); - 12.🔍 Which is the odd one out? (a) makes a form box (b) makes headings and lists (c) reacts to a button click (d) makes a link
- 13.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
-
14.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 15.🎯 Which element does the selector #hero style? (a) <li id="top"> (b) <li class="hero"> (c) <li id="hero"> (d) <div class="note">
-
16.📝 How many <input> tags are in this form?
<form>
<input type="text">
<input type="email">
<input type="checkbox">
<input type="password">
<input type="number">
<input type="submit" value="Send">
</form> - 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
-
18.⚡ What number does this code print?
let coins = 15;
coins = coins + 19;
coins = coins - 23;
console.log(coins); -
19.📋 What number does the browser show next to “Litchi”?
<ol start="6">
<li>Mango</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 21.Which of these goes in the head? (a) <p> (b) <title> (c) <a> (d) <img>
- 22.🌈 Which colour of light is strongest in rgb(13, 198, 122)? (a) blue (b) green (c) red
- 23.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) style.css (c) script.js
-
24.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> -
25.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p> -
26.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Litchi</li>
<li>Banana</li>
<li>Grapes</li>
<li>Mango</li>
<li>Orange</li>
</ol> -
27.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="400"> - 28.True or false: <table> holds the whole table. (a) False (b) True
- 29.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
-
30.✍️ What value is given to width in this rule?
body {
border: 2px solid;
width: 300px;
background-color: yellow;
} (a) width (b) italic (c) red (d) 300px -
31.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) tiger.jpg (c) map.png (d) kite.png - 32.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) black (d) bright green
- 33.🔁 Which word runs code only when something is true? (a) log (b) for (c) let (d) if
- 34.True or false: <table> gives the table a title. (a) False (b) True
-
35.🖌️ What colour is behind the letters?
h2 {
color: purple;
background-color: orange;
text-align: right;
font-size: 32px;
} (a) purple (b) black (c) orange - 36.True or false: to log out on shared PCs is not safe. (a) False (b) True
- 37.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
- 38.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="50"> -
40.🔁 How many times does this code print “Welcome”?
for (let i = 1; i < 7; i++) {
console.log("Welcome");
}
Answer key
- holds the menu of links
- Welcome, Riya!
- A tiger asleep
- script.js
- flex-end
- 2
- has a closing tag
- <p id="intro">
- bus.jpg
- padding
- 65
- reacts to a button click
- <li>
- numbers
- <li id="hero">
- 6
- <img>
- 11
- 7
- opens it in a new tab
- <title>
- green
- index.html
- 400
- 2
- 6
- 400
- True
- <ul>
- 300px
- tiger.jpg
- bright green
- if
- False
- orange
- False
- 129
- <ul>
- 50
- 6
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids