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.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
- 2.🔢 When you open a web page, which comes first: “the browser shows it” or “the browser asks it”? (a) the browser shows it (b) the browser asks it
- 3.🌍 What finds the server for a domain name like example.com? (a) CSS (b) HTML (c) DNS (d) alt
- 4.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
-
5.📦 How much space across (px) does this box take in all, margin included?
.box {
width: 100px;
padding: 20px;
border: 4px solid black;
margin: 20px;
} - 6.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 7.🏷️ HTML marks up text using ___. (a) keys (b) tags (c) pixels (d) wires
-
8.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> - 9.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
- 10.🌈 Which colour is #ff0000? (a) red (b) cyan (c) bright green (d) yellow
-
11.🔍 One closing tag is missing. Which one?
<b>My pets</b>
<em>Cricket is fun.
<u>Good morning!</u> (a) </u> (b) </em> (c) </b> (d) </h2> - 12.What does text-align do? (a) colours behind the text (b) sets the letter colour (c) makes letters bigger (d) centres a heading
- 13.True or false: <a> goes in the body. (a) False (b) True
- 14.🚀 Which file should this code go in: <p>Hello!</p> (a) script.js (b) index.html (c) style.css
- 15.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
-
16.⚡ What number does this code print?
let a = 3;
let b = 7;
console.log(a * b); -
17.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
<li>Grapes</li>
</ul> -
18.📝 At most, how many of these can be chosen at the same time?
<form>
<input type="checkbox" name="sport"> Cricket
<input type="checkbox" name="sport"> Chess
<input type="checkbox" name="sport"> Hockey
<input type="checkbox" name="sport"> Football
<input type="checkbox" name="sport"> Kabaddi
</form> -
19.✍️ Which property is set to bold in this rule?
#top {
text-align: center;
font-weight: bold;
background-color: yellow;
font-style: italic;
} (a) width (b) bold (c) border (d) font-weight - 20.🎯 Which sign starts a class selector? (a) . (b) @ (c) # (d) &
- 21.📊 In a table, which tag is a row? (a) <td> (b) <tr> (c) <th> (d) <tb>
- 22.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
23.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>The red kite</p>
<p>I love mangoes.</p> -
24.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) moon.png (b) bus.jpg (c) dog.jpg (d) A happy dog - 25.✍️ Which sign ends each CSS declaration? (a) ; (b) . (c) , (d) :
- 26.🎯 What kind of selector is #main? (a) a class selector (b) an element selector (c) an id selector
- 27.True or false: <ol> shows bullet points. (a) True (b) False
- 28.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) cyan (d) blue
- 29.🧩 Which language shows a pop-up message? (a) CSS (b) HTML (c) JavaScript
-
30.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) index.html (c) Class 7 Blog (d) My drawings - 31.⚡ Which JavaScript word repeats code? (a) for (b) console.log() (c) alert() (d) let
- 32.🌍 What does a web address (URL) tell the browser? (a) how old you are (b) your password (c) the page colour (d) where the page is
- 33.⚡ What does JavaScript add to a web page? (a) the page title (b) only colours (c) the domain name (d) actions and changes
- 34.📝 Which tag makes a big box for many lines of text? (a) <textarea> (b) <input> (c) <p> (d) <br>
- 35.🔢 On a typical page, from top to bottom, which comes LAST? (a) <main> (b) <nav> (c) <footer> (d) <header>
- 36.True or false: the content is space inside the border. (a) False (b) True
- 37.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <input> (d) <ol>
-
38.⚡ What number does this code print?
let apples = 18;
apples = apples + 11;
apples = apples - 2;
console.log(apples); - 39.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
40.⚖️ What colour is the text of this element?
<h2 class="red" id="end">Hi</h2>
CSS:
h2 { color: red; }
h2 { color: black; } (a) blue (b) green (c) black (d) red
Answer key
- easy to read
- the browser asks it
- DNS
- alt
- 188
- False
- tags
- 250
- 27
- red
- </em>
- centres a heading
- True
- index.html
- an element selector
- 21
- 5
- 5
- font-weight
- .
- <tr>
- in the body
- 3
- dog.jpg
- ;
- an id selector
- False
- cyan
- JavaScript
- Class 7 Blog
- for
- where the page is
- actions and changes
- <textarea>
- <footer>
- False
- <form>
- 27
- in the head
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids