What does a front-end developer do?
A front-end developer builds the part of a website or web app that people see and use: layout, forms, buttons and the code that makes them respond. The work turns a design into working pages that load fast, work in every browser and can be used with a keyboard or a screen reader.
The Bureau of Labor Statistics has no separate profile for front-end developers. The nearest is web developers and digital designers, where BLS says "Front-end web developers create the technical features for a website's look." BLS gives a median annual wage for web developers of $92,650 in May 2025. It projects overall employment of web developers and digital designers to grow 5 percent from 2025 to 2035.
The O*NET OnLine profile for web developers (15-1254.00) lists tasks such as "Evaluate code to ensure that it is valid, is properly structured, meets industry standards, and is compatible with browsers, devices, or operating systems." Another is "Recommend and implement performance improvements." Those two lines explain most of the technical round.
How were these front-end developer questions chosen?
Each front-end developer question here comes from a duty that BLS or O*NET publishes, matched to the question it tends to produce. The questions are drawn from the job's published duties, not from a survey of real interviews, and nothing here claims to be the most asked list or to match what a named company asks.
| Duty (BLS, O*NET) | Question it tends to produce | What the interviewer is checking |
|---|---|---|
| Create and test applications, interfaces, and navigation menus | "Build this component from the mockup" | Clean markup, sensible state and the edge cases you test |
| Check code is compatible with browsers and devices | "This layout breaks on one phone. Why?" | A method for finding the cause, beyond guessing |
| Responsible for usability of the site or interface | "How would you make this form accessible?" | Labels, keyboard use, errors a screen reader announces |
| Recommend and implement performance improvements | "This page is slow on mobile. Where do you start?" | Measuring first, then fixing the biggest cost |
| Perform site tests after any revision | "How do you test a component?" | What you test, at what level, and why |
| Work with designers to determine the layout | "The design can't be built as drawn. What now?" | How you raise trade-offs early and agree on a fix |
What layout and browser questions come up?
Layout questions test whether a front-end developer can turn a design into markup that holds up on every screen. Interviewers watch you choose elements, structure the styles and handle the awkward cases: long text, a missing image, a narrow phone. Talk while you build so they hear why you chose each piece.
1. Build this card component from the mockup.
What they listen for: semantic HTML first (a heading, a list, a real button), then styles, then behaviour. Say what happens with a very long title or no image. Follow-up that tends to come next: "Now make it work in a grid of twelve cards."
2. How do you make a layout work from a small phone to a wide monitor?
What they listen for: a plan for breakpoints based on the content, flexible units, and testing on real devices as well as resized browser windows. Follow-up: "Which layout tool would you pick here, and why?"
3. A bug shows up in one browser only. How do you find it?
What they listen for: reproduce it, reduce the page to the smallest case that still fails, check what that browser supports, then fix and retest everywhere. Follow-up: "How would you stop the same bug coming back?"
What accessibility questions should you expect?
Accessibility questions check whether a front-end developer builds pages everyone can use. The Justice Department's guidance on web accessibility under the ADA names common barriers, including poor color contrast, images without alt text, and mouse-only navigation. It points to the Web Content Accessibility Guidelines (WCAG) as one helpful technical standard.
The guidance says "Labels, keyboard access, and clear instructions are important for forms to be accessible." That line is a fair summary of what interviewers want to hear. Nothing on this page is legal advice about the ADA.
4. How would you make this sign-up form accessible?
What they listen for: a visible label tied to each field, a logical tab order, error messages that say what went wrong and are announced to screen readers, and no meaning carried by color alone. Follow-up that tends to come next: "How would you test that it works?"
This question best shows the role, so here is a weak answer and the same answer fixed. Both are made-up examples.
Weak made-up example: "I'd add ARIA labels to everything and run an accessibility checker. If the checker passes, the form is accessible."
The weak answer leans on one tool and adds ARIA where plain HTML would do. It never says how a keyboard or screen reader user would fill in the form, or how errors reach them.
Fixed made-up example: "I'd start with plain HTML: a label element for each input, the right input types, and a real submit button, so the browser does most of the work. Required fields would say so in text, since red alone doesn't reach everyone. On submit, I'd list the errors at the top, move focus there, and link each one to its field. Then I'd test it myself: fill it in with only the keyboard, run it with a screen reader, check the contrast, and run an automated checker last to catch what I missed."
5. How do you test a page for accessibility?
What they listen for: an automated scan plus manual checks with the keyboard and a screen reader, since a scan cannot judge everything. Follow-up: "What did the last audit you ran find?"
6. A design marks errors only with red borders. What do you do?
What they listen for: raising it with the designer, adding text and an icon, and keeping contrast readable. Follow-up: "What if the designer says no?"
What performance questions come up?
Performance questions test whether a front-end developer measures before fixing. Google's Web Vitals guide says "LCP should occur within 2.5 seconds of when the page first starts loading," pages should have an INP of 200 milliseconds or less, and pages should keep layout shift (CLS) at 0.1 or less.
The same guide suggests measuring at "the 75th percentile of page loads, segmented across mobile and desktop devices." Quoting a target and how it is measured shows you have done this work, beyond reading about it.
7. A product page is slow on mobile. Where do you start?
What they listen for: measure with real user data and a lab tool, find the largest element and what delays it, then work on the biggest cost first (images, render-blocking scripts, fonts). Follow-up: "How would you know the fix worked for real users?"
8. What are the Core Web Vitals, and which would you fix first on our site?
What they listen for: the three measures, what each one captures, and a choice based on data. Follow-up: "What tends to cause a poor INP?"
9. Content jumps as the page loads. How do you fix it?
What they listen for: reserving space for images, ads and embeds, and loading fonts in a way that does not shift text. Follow-up: "How would you catch this before release?"
What JavaScript and data questions come up?
JavaScript questions test how a front-end developer fetches data, holds state and keeps the interface correct while things load or fail. Interviewers want each state named: loading, empty, error and success. They also probe browser security rules, because a request that works in a test tool can fail in the browser.
10. A request to our API works in a test tool but fails in the browser. Why?
What they listen for: the same-origin policy and CORS. MDN's page on the same-origin policy says two URLs share an origin when the protocol, "port (if specified), and host are the same for both." The fix is a server header, which means talking to the back-end team. Follow-up: "Why not just turn the check off?"
11. Where should this piece of state live?
What they listen for: keep state as close as possible to where it is used, lift it only when two parts need it, and keep server data separate from what the user is typing. Follow-up: "What breaks if two tabs edit the same item?"
12. How do you test a component?
What they listen for: tests of behaviour a user sees, a few integration tests for key flows, and a check after each change. O*NET lists "Perform Web site tests according to planned schedules, or after any Web site or product revision." Follow-up: "Which test would you skip if time ran short?"
What questions test work with designers and the back end?
Collaboration questions check how a front-end developer handles the gap between a design, an API and a deadline. BLS lists working "with graphics and other designers to determine the website's layout" among the duties. Answer these with one real event in STAR order: situation, task, action, result.
The STAR method guide covers the structure.
13. Tell me about a design you could not build as drawn.
What they listen for: you raised it early, showed the cost of each option, and agreed a version with the designer. Follow-up: "What did the user end up seeing?"
14. Tell me about a front-end bug you shipped.
What they listen for: how users were affected, how fast you fixed it, and the test or check you added. The guide to tell me about a mistake you made helps here. Follow-up: "How did you find out about it?"
What follow-up questions tend to come next?
Follow-ups push on the edges of your answer. A front-end interviewer may shrink the screen, switch off the mouse, slow the network or break the API, then ask what the user sees. Prepare by walking through each project on your resume in those four conditions before the interview.
- "What does a screen reader announce here?"
- "What happens on a slow 3G connection?"
- "What does the user see if the request fails?"
- "How big is the JavaScript this page ships?"
- "What would you change if you rebuilt it now?"
How should you prepare for a front-end developer interview?
Prepare one project you can explain in depth, from design to release, with a number for speed or errors. Practise building a small component out loud with a timer. Check one of your own pages with only the keyboard and fix what you find, because you may be asked how you did it.
The free interview question generator takes the job posting and the round you pick, and returns likely questions, why they come up and what the interviewer listens for. Front-end loops overlap with other roles, so compare this page with the questions for a software engineer, a UX designer and a QA engineer.
Show speed, accessibility and test results on your resume, not only frameworks. The guide to resume bullet points shows how. Prept's Mock room lets you answer out loud on a clock, scores each answer out of 10 and checks it against your resume, and it is included in the free plan.