16 Interview Questions

Interview Questions for a Frontend Developer

To interview a frontend developer, test CSS and layout fluency, JavaScript and framework depth, accessibility, and rendering performance. This set covers the box model, reactivity and state, semantic HTML and ARIA, Core Web Vitals, and how a candidate builds responsive, accessible interfaces that stay fast as they grow.

Run a frontend interview with at least one hands-on UI task in the browser so you can watch real CSS, DOM, and component decisions, then probe accessibility and performance, which weaker candidates often skip. Score craft, not just whether it works.

Technical & Role-Specific

Explain the difference between flexbox and grid, and when you'd reach for each.

What to look for: Flexbox for one-dimensional flow, grid for two-dimensional layout; can articulate real cases rather than reciting that 'grid is newer.'

What causes layout shift, and how do you keep Cumulative Layout Shift near zero?

What to look for: Reserving space with width and height or aspect-ratio for images and embeds, avoiding inserting content above existing content, and font-loading strategy.

How does the browser event loop handle a click handler, a fetch, and a setTimeout?

What to look for: Distinguishes the call stack, microtasks (promises), and the task queue; explains why promise callbacks run before timers.

How do you make a custom dropdown or modal accessible?

What to look for: Keyboard navigation, focus trapping and return, correct ARIA roles, aria-modal, and Escape to close; knows native elements first.

What is the difference between controlled and uncontrolled components, and when do you use each?

What to look for: Controlled state lives in the framework for predictability; uncontrolled defers to the DOM for simple or performance-sensitive inputs.

How would you diagnose and fix a sluggish list that re-renders too often?

What to look for: Profiles renders, identifies unnecessary re-renders, applies memoization, stable keys, and virtualization for long lists rather than guessing.

What's the largest lever for improving Largest Contentful Paint on a content page?

What to look for: Optimizing the hero image and critical CSS, preloading key resources, reducing render-blocking JS, and right-sizing fonts.

How do you ship a responsive image so mobile users don't download a desktop-sized asset?

What to look for: srcset and sizes, modern formats like WebP or AVIF, explicit dimensions, and lazy-loading below the fold.

Behavioral

Tell me about a time you pushed back on a design that would hurt accessibility or performance.

What to look for: Advocates for users, communicates trade-offs to designers, and finds a solution that satisfies both intent and constraints.

Describe a UI bug that only reproduced on a specific device or browser. How did you handle it?

What to look for: Cross-browser testing discipline, isolating the difference, and using progressive enhancement rather than user-agent hacks.

How do you stay current with a frontend ecosystem that changes constantly?

What to look for: Focuses on fundamentals over chasing every library, evaluates tools critically, and avoids resume-driven development.

Tell me about a time you collaborated closely with a designer to ship a polished UI.

What to look for: Respect for design intent, ability to flag technical constraints early, and pride in pixel-level and interaction craft.

Situational / Problem-Solving

A page passes Lighthouse on your laptop but feels slow for real users on mobile. What do you check?

What to look for: Field data versus lab data, network throttling, device CPU, third-party scripts, and bundle size on real connections.

Marketing wants a third-party widget that drags performance down. How do you handle it?

What to look for: Loads it on interaction or lazily, isolates it, measures the cost, and negotiates with stakeholders using data.

You need to support a design system across multiple teams. How do you prevent style drift?

What to look for: Tokens, shared components, documentation, and visual regression testing rather than copy-pasted CSS.

A complex form has grown buggy and hard to maintain. How do you decide whether to refactor or rebuild it?

What to look for: Weighs state-management choices, isolates the messy parts behind tests, and avoids a risky full rewrite when incremental works.

FAQ

Frequently asked questions

How many interview rounds for a Frontend Developer? +
Usually three to four: a screen, a hands-on UI build or live styling task, a JavaScript and framework deep-dive, and a behavioral round. For senior roles, add a design-system or architecture discussion.
Should frontend interviews include accessibility questions? +
Yes. Accessibility is a baseline professional skill, not a nice-to-have, and it correlates with overall craft. Asking how a candidate makes a modal or form keyboard-navigable and screen-reader friendly quickly separates those who build for all users from those who only build for the mouse.
How important is CSS depth versus JavaScript framework knowledge? +
Both matter, but underweighting CSS is a common mistake. Frameworks change every few years; layout, the box model, specificity, and responsive design are durable. A candidate strong in CSS and accessibility but learning a new framework is usually a better bet than the reverse.
What is the best way to test a frontend developer's real skills? +
Give a small, realistic browser task: build a responsive, accessible component from a spec and talk through your choices. It reveals CSS fluency, semantic HTML, state handling, and how the candidate balances speed against quality far better than algorithm puzzles.
Built for recruiters & hiring teams

See how much faster your team could hire

Get a personalized walkthrough of Pitch N Hire on your own roles and workflow. No slides, no obligation.

Prefer to talk? Book a demo · View pricing

Free 1-user plan · No credit card · Talk to a real hiring expert

One Hiring Infrastructure.
Zero Tool Chaos.

Demos are consultative. We respect privacy and enterprise
governance. No lock-ins.

Sign up free Book a demo