HTML & CSS ⚡ Recently updatedUpdated on Jun 30, 2026 — this content may still be evolving.
HTML & CSS: Mock Interview (45 Minutes)
Use this script with a friend. One person is interviewer, one is candidate. Switch roles after.
Rules:
- Candidate answers out loud, no reading from notes
- Interviewer asks at least 2 follow-ups per question
- Time each section
Section 1: Warm-up (5 min)
- “Tell me about a frontend project you’ve worked on.”
- “How did you approach styling it?”
- “Did you face any CSS challenges?”
Interviewer: Note if candidate mentions responsive design and semantic HTML.
Section 2: HTML Fundamentals (8 min)
- “What is semantic HTML? Give me 3 semantic tags and when you’d use them.”
- Follow-up: “What’s the difference between
<section>and<article>?”
- Follow-up: “What’s the difference between
- “How do you make a form accessible?”
- Follow-up: “What happens if you use a
<div>as a button?”
- Follow-up: “What happens if you use a
- “Explain
defervsasyncon script tags.”
Section 3: CSS Core (10 min)
- “Explain the CSS box model.”
- Follow-up: “What does
box-sizing: border-boxchange?”
- Follow-up: “What does
- “How does CSS specificity work? Which wins:
#nav .linkorul li a?”- Follow-up: “When would you use
!important?” (Trick: almost never)
- Follow-up: “When would you use
- “What’s the difference between
display: none,visibility: hidden, andopacity: 0?”
Section 4: Layout Live Challenge (12 min)
Interviewer: Share screen or use paper/whiteboard.
“Build a responsive layout: header with logo + nav links, 3-column card grid below, footer. Cards should become 1 column on mobile. Talk through your approach.”
Candidate explains approach first, then writes HTML/CSS (or pseudocode).
Follow-ups:
- “Why Grid instead of Flexbox here?” (or vice versa)
- “How would you center the logo and nav?”
- “Add a sticky header.”
Evaluation criteria:
- Uses semantic HTML
- Chooses appropriate layout method
- Mentions responsive strategy
- Clean class naming
Section 5: Advanced / Tricky (5 min)
Pick 2:
- “What is z-index and when does it not work?”
- “How would you implement dark mode?”
- “What is
clamp()and where would you use it?” - “How do you optimize web font loading?”
Section 6: Project Connection (5 min)
- “Open your project (or describe it). Walk me through the HTML structure.”
- “Show me one CSS decision you’d change if you rebuilt it.”
- “How did you handle mobile responsiveness?”
Evaluation Rubric (Quick)
| Area | 1 (Weak) | 3 (Good) | 5 (Strong) |
|---|---|---|---|
| Semantic HTML | div soup | Some semantic tags | Consistent semantic structure |
| Layout | Only knows floats | Flexbox comfortable | Flex + Grid, explains tradeoffs |
| Responsive | Desktop only | 1-2 breakpoints | Mobile-first, fluid design |
| Debugging | Guesses | Knows specificity | Systematic DevTools approach |
| Communication | One-word answers | Clear explanations | Examples + tradeoffs + project links |
Debrief (5 min)
Candidate asks:
- Which answers were weak?
- Did I talk too much or too little?
- Was my live coding approach clear?
Homework: Redo weak sections from interview-questions.md and retry Section 4 in 20 minutes.