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 this heading order correct (no level skipped)?
<h1> → <h3> → <h2> → <h2> (a) No (b) Yes -
2.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 3.Which of these does JavaScript do? (a) rounds box corners (b) shows a pop-up message (c) gives the page structure (d) sets colours and fonts
-
4.🔁 How many times does this code print “Hello”?
for (let i = 3; i <= 12; i++) {
console.log("Hello");
} - 5.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) space-between (c) flex-end (d) center
- 6.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <main> (b) <nav> (c) <header> (d) <footer>
- 7.True or false: a web server turns HTML into a page. (a) True (b) False
- 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 9.🌗 Is pink on red easy or hard to read? (a) easy to read (b) hard to read
- 10.✍️ Which sign goes between a property and its value? (a) : (b) - (c) = (d) ;
-
11.✍️ What is the selector in this CSS rule?
.box {
border: 2px solid;
text-align: center;
background-color: yellow;
font-style: italic;
} (a) .box (b) center (c) h2 (d) border -
12.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Jamun</li>
</ul> - 13.🎯 What kind of selector is .menu? (a) an element selector (b) a class selector (c) an id selector
-
14.✍️ What is the selector in this CSS rule?
h1 {
margin: 10px;
font-weight: bold;
} (a) p (b) bold (c) margin (d) h1 - 15.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) add CSS styles (b) publish it online (c) write the HTML (d) test in a browser
- 16.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
- 17.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
- 18.True or false: <article> holds a news story. (a) False (b) True
- 19.⚡ Which JavaScript word runs code when true? (a) console.log() (b) for (c) if (d) let
-
20.💪 How much empty space (px) is before the first box?
.row {
display: flex;
width: 320px;
justify-content: center;
}
Inside are 4 boxes, each 50px wide (no margins). - 21.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
-
22.🔍 One closing tag is missing. Which one?
<p>My best friend
<em>Good morning!</em>
<i>Cricket is fun.</i> (a) </em> (b) </i> (c) </strong> (d) </p> -
23.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="300"> - 24.✍️ In color: blue; which part is the property? (a) : (b) ; (c) blue (d) color
- 25.🧩 Which language reacts to a button click? (a) JavaScript (b) CSS (c) HTML
- 26.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
- 27.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
- 28.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 29.True or false: a code editor turns HTML into a page. (a) True (b) False
-
30.🎯 Which CSS selector matches this element?
<h1 class="red" id="hero">Hello</h1> (a) .box (b) #red (c) h1 (d) h2 - 31.Which of these is an empty tag? (a) <h1> (b) <br> (c) <li> (d) <p>
- 32.🛡️ Online: is it safe to post your home address? (a) not safe (b) safe
- 33.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) sends pages over the net (d) shows pages from the web
- 34.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
- 35.True or false: <input type="submit"> sends the form. (a) False (b) True
-
36.⚖️ What colour is the text of this element?
<h1 class="big" id="intro">Hi</h1>
CSS:
#intro { color: white; }
#intro { color: black; } (a) black (b) white (c) yellow (d) blue - 37.Which of these is an opening tag? (a) </body> (b) <li> (c) </li> (d) </p>
- 38.True or false: <input type="email"> lets you pick only one. (a) True (b) False
- 39.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
- 40.🔍 Which is the odd one out? (a) adds space around boxes (b) reacts to a button click (c) changes the text size (d) sets colours and fonts
Answer key
- No
- 3
- shows a pop-up message
- 10
- space-between
- <header>
- False
- Yes
- hard to read
- :
- .box
- 3
- a class selector
- h1
- write the HTML
- <li>
- <h1>
- True
- if
- 60
- 192
- </p>
- 300
- color
- JavaScript
- an id selector
- src
- in the body
- False
- h1
- <br>
- not safe
- shows pages from the web
- <h3>
- True
- black
- <li>
- False
- href
- reacts to a button click
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids