Final exam
Build Your First Website
Before you start
- 20 questions, drawn at random from a pool of 34.
- Pass mark: 70%. Your final score is 30% practice + 70% exam.
- No time limit, but finish within 3 hours. You can move between questions before you submit.
- Failed? Review the lessons and try again: every attempt gets a new set of questions.
Question 1 of 20Choose one
Which language is responsible for what a web page does when a visitor types in a search box?
Question 2 of 20Put in order
Order the events from pressing Enter on a web address to seeing the page.
Drag the items, or use the arrow buttons, to put them in order.
- The browser fetches the style sheet and images listed in the HTML
- The server answers with a status code and the HTML
- The page is drawn on the screen
- The browser sends a request for the page
- The browser asks DNS for the server's IP address
Question 3 of 20True or false
The https at the start of a URL means the data exchanged with the server is encrypted.
Question 4 of 20Match the pairs
In the address https://shop.example.com/art/prints.html, match each part to its name.
Tap an answer, then tap the place where it belongs (or drag it there).
- https
- shop.example.com
- /art/prints.html
- prints.html
Question 5 of 20Choose one
Which element sets the text that appears on the browser tab?
Question 6 of 20Spot the mistake
Which lines of this page skeleton contain mistakes?
Question 7 of 20Fill in the blanks
Fill in the blanks
Information added inside an opening tag, such as href="about.html", is called an . Elements like img that have no closing tag are called elements.
Question 8 of 20Choose one
A recipe page lists eight steps that must be followed in sequence. Which markup fits best?
Question 9 of 20True or false
Using h4 for a page's main title is fine as long as CSS makes it look large.
Question 10 of 20Sort into groups
Which element best fits each piece of content?
Tap an item, then tap its group (or drag it there).
Question 11 of 20Choose one
The page blog/post.html needs to link to the home page index.html, which sits one folder above it. What should the href be?
Question 12 of 20What would you do?
What would you do?
A photo on Zoe's page shows her dog catching a frisbee in the park. It is the main picture on her About page. What alt text should she use?
Question 13 of 20Select all that apply
Which of these are semantic HTML elements that describe the role of a page region? Select all that apply.
Select all that apply.
Question 14 of 20True or false
Linking to an image with a path like C:/Users/Sam/Pictures/me.jpg will work for visitors once the site is online.
Question 15 of 20Choose one
Which declaration is written correctly?
Question 16 of 20Match the pairs
Match each CSS selector with the HTML it targets.
Tap an answer, then tap the place where it belongs (or drag it there).
- .menu
- #hero
- footer p
- img
Question 17 of 20Work it out
In the hex color #3366ff, what is the decimal value of the blue component? (ff in hexadecimal)
Question 18 of 20True or false
When two CSS rules with equally specific selectors set different colors for the same element, the rule that appears later in the style sheet wins.
Question 19 of 20Work it out
A box has width: 200px, padding: 15px, border: 5px and margin: 10px, all on every side, with default content-box sizing. How many pixels of horizontal space does it take up in total, including margins?
Question 20 of 20Choose one
What does adding * { box-sizing: border-box; } to a style sheet change?
Question 21 of 20Sort into groups
Is each description about padding or margin?
Tap an item, then tap its group (or drag it there).
Question 22 of 20Choose one
A flex container holds a title and three icons. You want them spread out with the first at the far left and the last at the far right. Which property and value do this?
Question 23 of 20True or false
Setting flex-direction to column makes justify-content control vertical spacing.
Question 24 of 20Fill in the blanks
Fill in the blanks
To let flex items move onto a new line when they run out of space, set flex-wrap to . To make an item grow and share the leftover space, give it flex: .
Question 25 of 20Choose one
Which line belongs in the head so phones display a page at their real width?
Question 26 of 20What would you do?
What would you do?
Kai's gallery shows three columns on laptops, but on phones the images are cut off and the page scrolls sideways. His CSS sets each image to width 400px. What change helps most?
Question 27 of 20True or false
In a mobile-first style sheet, a media query such as @media (min-width 800px) is used to add styles for larger screens.
Question 28 of 20Choose one
What does document.querySelector(".card") return when the page contains three elements with class card?
Question 29 of 20Put in order
Arrange these lines into a working click counter script.
Drag the items, or use the arrow buttons, to put them in order.
- btn.addEventListener("click", function () {
- clicks = clicks + 1;
- let clicks = 0;
- });
- btn.textContent = "Clicked " + clicks + " times";
- const btn = document.querySelector("#btn");
Question 30 of 20Sort into groups
Which part of a site should handle each task?
Tap an item, then tap its group (or drag it there).
Question 31 of 20Select all that apply
Before publishing a personal site, which items should a teen remove? Select all that apply.
Select all that apply.
Question 32 of 20Choose one
Which statement about hosting a static portfolio is accurate?
Question 33 of 20True or false
A W3C validator can find HTML errors that a browser hides by quietly fixing them.
Question 34 of 20What would you do?
What would you do?
After uploading, Maya's site loads but every image is broken. On her laptop everything worked. Her HTML uses src="Images/Logo.PNG" while the files are named images/logo.png. What's the likely cause?