LeetCamp written quiz
Day 19 · about 20 minutes · 20 marks · Name (first name only): ____________
Part A: choose one answer (1 to 7 are about our LeetCamp site, 8 to 10 are general) 10 marks
- Our site. What does
<link rel="stylesheet" href="styles.css" /> do?- Connects the CSS file to the page
- Makes a link to another page
- Adds a picture
- Our site. The navbar is
<header class="nav">. What is class="nav" for?- It shows the word nav on the page
- It gives the box a name so CSS can style it
- It links to the navbar page
- Our site. Which three steps repeat in "How we do it"?
- Read, Write, Print
- Start, Stop, Pause
- Plan and Build, Test and Debug, Deploy and Showcase
- Our site.
.steps { display: grid; grid-template-columns: repeat(3, 1fr); } does what to our step cards?- Hides them
- Puts them side by side in three equal columns
- Stacks them in one column
- Our site.
.nav-inner uses display: flex; justify-content: space-between;. What do we see?- The LeetCamp name on the left and the links on the right
- Everything in the middle, on top of each other
- Nothing, the navbar disappears
- Our site. At the top of
styles.css we wrote --accent: #b88cff;. What is it?- A broken line of code
- The name of a font
- A variable: a colour we name once and reuse with var(--accent)
- Our site. Our quiz checks
if (answer === "Tsavo"). A learner clicks Amboseli. What happens?- The page crashes
- The else part runs and says Not quite, try again
- The quiz says Correct
- General. From the inside out, the box model is:
- margin, border, padding, content
- content, padding, border, margin
- padding, content, margin, border
- General. What is the
alt text on an image for?- To make the image bigger
- To describe the image if it cannot be seen
- To link to another page
- General. What does
console.log("Hi") do?- Deletes the page
- Makes a button
- Shows Hi in the Console (a tool for finding bugs)
Part B: spot the bug (from our site) 6 marks
- Spot the bug in our quiz button and write the fix.
<button class="quiz-btn" onclick="check('Tsavo')>Tsavo</button> 2 marks
- Spot the bug in our card hover and write the fix.
.card:hover {
transform translateY(-4px);
} 2 marks
- Our quiz result never appears on the page. Spot the bug and write the fix.
document.getElementById("result").textcontent = "Correct!"; 2 marks
Part C: short answers 4 marks
- Our site has three kinds of files. Name them and say what each one does (3 marks). 3 marks
- Describe one bug you fixed in YOUR project and how you fixed it. 1 mark