Remoteria
RemoteriaBook a 15-min intro call
500+ successful placements4.9 (50+ reviews)30-day replacement guarantee

Interview guide

Web Developer Interview Questions & Answers Guide (2026)

A hiring-manager’s interview kit for web developers — with specific “what to look for” notes on every answer, red flags to watch, and a practical test.

Key facts

Role
Web Developer
Technical questions
15
Behavioral
7
Role-fit
5
Red flags
8
Practical test
Included

How to use this guide

Pick 4-6 technical questions across difficulties, 2-3 behavioral, and 1-2 role-fit for a 45-minute interview. For senior roles, weight harder technical and role-fit higher. Always close with the practical test so you are hiring on evidence, not impressions. The “what to look for” notes are a scoring rubric: strong answers touch most points, weak answers miss them or replace them with platitudes.

Technical questions — Easy

1. Explain CSS specificity. Given a button that refuses to turn red despite `!important`, where would you look?

Easy

What to look for: Specificity hierarchy (inline > id > class > tag), order of appearance, @layer cascade, a later !important, inline styles from JS, shadow DOM boundaries. Methodical not magical.

2. What is the difference between `rel=canonical` and a 301 redirect? When do you use each?

Easy

What to look for: Canonical: two valid URLs, signal preferred to search. 301: old URL goes away permanently. Canonical does not pass users; 301 does. Bad canonical (pointing to unrelated page) can deindex you.

3. You have 100 KB of unused CSS on the homepage. What are your options?

Easy

What to look for: Tailwind with proper purge / content config, PurgeCSS for non-Tailwind, critical CSS inlining for above-the-fold, code splitting route-level CSS. Measures after each change.

4. Explain the `loading="lazy"` attribute and why you should not put it on the hero image.

Easy

What to look for: Defers offscreen images; on LCP image, it delays the largest paint and tanks LCP. Knows fetchpriority="high" is the opposite hint.

Technical questions — Medium

1. Walk me through how you would improve a Lighthouse score of 45 on a marketing homepage.

Medium

What to look for: Measure first: which metric is failing? LCP → preload hero image, AVIF/WebP, remove render-blocking CSS, fonts with font-display:swap. CLS → reserve aspect ratios. INP → defer heavy JS, remove third-party bloat. Real playbook, not handwaving.

2. What is progressive enhancement and when does it matter in 2026?

Medium

What to look for: HTML works without JS; JS enhances. Matters for SEO crawlers, slow networks, accessibility, partial hydration. Knows when it is overkill (pure app surfaces) vs essential (marketing, content).

3. How do you implement a responsive image strategy that covers mobile retina, desktop, and older browsers?

Medium

What to look for: srcset + sizes, picture element for art direction or format fallback, AVIF → WebP → JPEG chain, loading="lazy" below the fold, fetchpriority on LCP image, explicit width/height to prevent CLS.

4. Explain Core Web Vitals and how field data (CrUX) differs from lab data (Lighthouse). Why do regressions hide in one and not the other?

Medium

What to look for: Lab is controlled synthetic; field is real users at 75th percentile over 28 days. INP regressions from ad scripts hide in lab but appear in field. Mobile-heavy audiences change the picture.

5. Walk me through adding JSON-LD schema for a blog article with author and FAQ. What can go wrong?

Medium

What to look for: Article + Person + FAQPage schemas, matches visible content, valid in Rich Results Test, @id linking. Common mistakes: stale dates, fake FAQs, FAQ on unrelated pages.

6. A client reports the site looks broken on iPhone 12 Safari but fine on Chrome desktop. How do you reproduce and fix?

Medium

What to look for: Real device or BrowserStack, check 100vh issues, sticky positioning, backdrop-filter, -webkit prefixes, safe-area-inset. Not "works on my machine".

7. Explain the difference between SSG, ISR, and SSR in Next.js. When do you pick each for a marketing site?

Medium

What to look for: SSG for pure static pages, ISR for content that updates on a schedule (blog, docs), SSR for personalized or very-fresh pages. Knows the cache and revalidation story.

8. A form submits successfully once in testing but fails intermittently in production with a 403. What do you check?

Medium

What to look for: CSRF token, CDN caching the POST (it should not), CORS preflight, bot protection (Turnstile, Cloudflare), rate limiting, cookie domain issues on subdomain setups.

9. Walk me through hooking up a Sanity or Contentful CMS to a Next.js site, including preview mode.

Medium

What to look for: Fetch in server components or getStaticProps, ISR with tag-based revalidation, webhook from CMS to trigger revalidation, preview cookie + draft mode for editors to see unpublished content.

10. Tell me about a site launch you shipped. What was the hairiest bug in the final week, and how did you catch it?

Medium

What to look for: Real story. Usually a CMS integration, hreflang, or third-party script. Shows how they run pre-launch QA: Lighthouse, Rich Results, real devices, 404 crawl.

Technical questions — Hard

1. How do you set up redirects and canonical URLs when migrating from WordPress to Next.js without losing rankings?

Hard

What to look for: 301 map every old URL, serve from next.config.js or edge middleware, rel=canonical on dupes, update sitemap and resubmit to Search Console, monitor Coverage report. Has done this before.

Behavioral questions

1. Tell me about a marketing stakeholder who asked for something that would hurt site performance or SEO. How did you handle it?

What to look for: Brought data (CrUX, Search Console), proposed an alternative, communicated cost in business terms. Not dismissive of marketing needs.

2. Describe a site launch that went wrong. What did you learn?

What to look for: Owns it. Ships a pre-launch checklist or runbook afterward. Talks about staging parity and 404 sweeps.

3. Walk me through how you ramp into an unfamiliar CMS or site codebase.

What to look for: Reads README, runs it locally, finds how content is modeled, traces one page from data to DOM. Opens a small content-type PR early.

4. When have you pushed back on a design that was beautiful but broke mobile or Core Web Vitals?

What to look for: Respectful, data-driven pushback. Proposed alternatives, not just rejection. Respected the designer.

5. How do you work with content writers and SEO specialists day-to-day?

What to look for: Treats them as peers. Sets up workflows (draft mode, preview URLs) that let them self-serve. Does not be a gatekeeper.

6. Tell me about a time you chose WordPress or Webflow over a custom build. Why?

What to look for: Pragmatic. Considered total cost, maintenance, who edits content, budget. Not dogmatic about "real code".

7. Describe the last 404 or redirect chain you debugged on a live site.

What to look for: Real story. Used Screaming Frog or a crawler, traced the chain, fixed in the redirect map. Comfortable in site-builder weeds.

Role-fit questions

1. This role spans marketing sites, CMS work, and the occasional React app. Comfortable being a generalist?

What to look for: Yes, enthusiastically. Some devs feel "beneath them" to do CMS work. Not this one.

2. How do you feel about working closely with marketing, SEO, and content rather than exclusively with engineers?

What to look for: Enjoys it. Translates technical trade-offs to non-technical stakeholders without condescension.

3. Our stack is Next.js + Sanity on Vercel with GA4 + HubSpot forms. Any unfamiliar pieces?

What to look for: Honest ramp plan. Admits gaps.

4. How do you handle 4 hours of overlap with a US team?

What to look for: Long-form PR descriptions, preview URLs for stakeholder review, Looms for content-model walkthroughs.

5. Where do you sit on pragmatism vs purism when a deadline hits for a campaign launch?

What to look for: Pragmatism with a cleanup ticket. Purism on accessibility, SEO fundamentals, and performance on money pages.

Red flags

Any one of these alone is usually reason to pass, especially combined with weak answers elsewhere.

Practical test

4-hour take-home: build a 3-page marketing site in Next.js (or Astro) backed by a headless CMS of your choice (Sanity free tier is fine): home, a blog index, and a dynamic article page. Requirements: JSON-LD for Organization + Article, valid in Rich Results Test; Lighthouse mobile performance ≥ 90; responsive down to 375px; accessible nav with keyboard support; working contact form with spam protection. Deploy to Vercel or Netlify and send the URL + repo. We grade on: Core Web Vitals (25%), SEO / schema (25%), accessibility (20%), CMS modeling (15%), code quality (15%).

Scoring rubric

Score each answer 1-4: (1) Misses most of the rubric or gives platitudes; (2) Hits some points but cannot go deep when pressed; (3) Covers the rubric and can defend the answer under follow-ups; (4) Adds unprompted nuance, trade-offs, or real examples beyond the rubric. Hire at an average of 3.0+ across technical, behavioral, and role-fit, with zero red flags, and a pass on the practical test.

Related

Written by Syed Ali

Founder, Remoteria

Syed Ali founded Remoteria after a decade building distributed teams across 4 continents. He has helped 500+ companies source, vet, onboard, and scale pre-vetted offshore talent in engineering, design, marketing, and operations.

  • 10+ years building distributed remote teams
  • 500+ successful offshore placements across US, UK, EU, and APAC
  • Specialist in offshore vetting and cross-timezone team integration
Connect on LinkedIn

Last updated: April 12, 2026