Career Guide · Frontend Engineering

Frontend Developer Roadmap: HTML to React, Performance & System Design

Six stages from layout fundamentals to designing frontend architecture for millions of users, with the interview topics that decide frontend offers at each level.

✍️ Pranjal Jain, Ex-Microsoft · IIT Kanpur 📅 10 October 2026 ⏱ 13 min read
Exploded 3D view of a browser showing DOM tree, layout grid and UI components
TL;DR
  • The web platform first: semantic HTML, modern CSS layout, and JavaScript to the depth of closures, the event loop and prototypes.
  • Then one framework deeply: React with TypeScript is the largest market in India; know rendering, hooks and state management trade-offs.
  • What separates mid-level engineers: browser internals, Core Web Vitals, accessibility and testing.
  • Frontend system design (component architecture, data flow, caching, performance) becomes a standard round from around SDE-2.
  • Interviews mix: JavaScript fundamentals, machine coding, DSA, and design. Prepare all four.

Frontend engineering is often misread as "making things look nice". In practice, a frontend engineer at a product company owns what the user experiences: how fast the page becomes usable on a ₹10,000 Android phone over a patchy 4G connection, whether a screen reader user can complete checkout, whether the UI stays consistent when three API calls return in an unexpected order. That is real engineering, and frontend interviews at good companies test it.

This roadmap covers the frontend path in six stages, from the platform fundamentals to frontend system design, with code you should be able to write and the interview topics each stage unlocks. If you are new to web development in general, start with the broader web development roadmap, which covers backend basics as well.

What Frontend Engineers Actually Do

  • Build features in a component framework, from design mockups to production.
  • Manage client state and server data: caching, optimistic updates, error and loading states.
  • Own performance: bundle size, rendering cost, images, Core Web Vitals.
  • Ensure accessibility and internationalization (important in India's multilingual market).
  • Maintain design systems and shared component libraries.
  • Collaborate on API contracts with backend engineers.
  • Debug issues that only happen on a particular browser, device or network.

Stage 1: The Web Platform (HTML and CSS)

Frameworks change every few years; the platform does not. Engineers with strong HTML and CSS are noticeably faster and produce fewer accessibility bugs.

HTML

  • Semantic elements and document structure; landmarks (header, nav, main, footer).
  • Forms: input types, labels, validation attributes, accessible error messages.
  • When to use button vs a (actions vs navigation), and why a clickable div is a bug.
  • Meta tags, responsive images (srcset, sizes), lazy loading.

CSS

  • The cascade, specificity, inheritance, and the box model.
  • Flexbox and Grid in depth, including minmax, auto-fit and alignment.
  • Positioning, stacking contexts and why z-index: 9999 sometimes does nothing.
  • Responsive design, container queries, custom properties (CSS variables), theming and dark mode.
  • Transitions and animations that only animate transform and opacity for smoothness.
  • One approach to scaling CSS: CSS Modules, a utility framework like Tailwind, or CSS-in-JS. Know the trade-offs.

Interview check: centre an element in five ways, explain specificity of #nav .item a, build a responsive card grid without media queries. See HTML and CSS interview questions.

Stage 2: JavaScript Depth

Frontend interviews in India lean very heavily on JavaScript fundamentals. Expect output-prediction questions, polyfill implementations and async puzzles.

TopicYou should be able to...
Scope and closuresExplain the classic var-in-a-loop with setTimeout bug and fix it two ways
thisPredict this for method calls, detached functions, arrow functions, call/apply/bind
PrototypesExplain the prototype chain and implement inheritance without class
Event loopOrder the output of mixed sync code, promises, setTimeout and queueMicrotask
PromisesImplement Promise.all, Promise.race, retry with backoff
Functional utilitiesWrite debounce, throttle, memoize, curry, deep clone, flatten
DOM and eventsUse event delegation, explain bubbling vs capturing, preventDefault vs stopPropagation
ModulesExplain ES modules vs CommonJS, tree shaking
JavaScript: implementing Promise.all
function promiseAll(items) {
  return new Promise((resolve, reject) => {
    const results = new Array(items.length);
    let remaining = items.length;
    if (remaining === 0) return resolve(results);

    items.forEach((item, i) => {
      Promise.resolve(item)            // accept plain values as well as promises
        .then((value) => {
          results[i] = value;          // keep input order, not completion order
          remaining -= 1;
          if (remaining === 0) resolve(results);
        })
        .catch(reject);                // first rejection wins
    });
  });
}

Three details interviewers check in this question: results preserve input order even when promises settle out of order, an empty input resolves immediately, and non-promise values are handled through Promise.resolve. Then they often ask for Promise.allSettled as a follow-up.

TypeScript

Most new professional frontend codebases use TypeScript. Learn types and interfaces, unions and narrowing, generics, utility types (Partial, Pick, Record), and typing React props and hooks. See TypeScript interview questions.

Stage 3: React and State Management

React has the largest frontend job market in India. Angular remains common in enterprises and services companies, and Vue at some startups. Whichever you pick, go deep enough to explain how it works, not just how to use it.

React concepts to master

  • Rendering model: what triggers a re-render, reconciliation, why keys matter in lists.
  • Hooks in depth: useState batching, useEffect dependencies and cleanup, useRef for mutable values, useMemo/useCallback and when they actually help.
  • Custom hooks for reusable logic.
  • Controlled vs uncontrolled components, forms at scale.
  • Context and its re-render cost; state libraries (Redux Toolkit, Zustand) and server-state libraries (TanStack Query, SWR).
  • Error boundaries, Suspense, code splitting with React.lazy.
  • Server rendering concepts via Next.js: SSR, SSG, ISR, hydration, React Server Components. See Next.js interview questions.
React + TypeScript: autocomplete hook that handles race conditions
import { useEffect, useState } from 'react';

type Suggestion = { id: string; label: string };

export function useSuggestions(query: string, delayMs = 250) {
  const [data, setData] = useState<Suggestion[]>([]);
  const [loading, setLoading] = useState(false);
  const [error, setError] = useState<string | null>(null);

  useEffect(() => {
    if (query.trim() === '') { setData([]); setLoading(false); return; }

    const controller = new AbortController();
    const timer = setTimeout(async () => {
      setLoading(true);
      setError(null);
      try {
        const res = await fetch(`/api/suggest?q=${encodeURIComponent(query)}`,
                                { signal: controller.signal });
        if (!res.ok) throw new Error(`HTTP ${res.status}`);
        setData(await res.json());
      } catch (e) {
        if ((e as Error).name !== 'AbortError') setError((e as Error).message);
      } finally {
        if (!controller.signal.aborted) setLoading(false);
      }
    }, delayMs);

    // Runs when query changes or the component unmounts:
    // cancels the pending debounce AND any in-flight request.
    return () => { clearTimeout(timer); controller.abort(); };
  }, [query, delayMs]);

  return { data, loading, error };
}

This hook is a compact demonstration of several things frontend interviewers probe: debouncing inside an effect, cleanup functions, and the stale response race condition. Without the abort, typing "ra" then "raz" could show results for "ra" if that request happens to return last. Aborting the previous request on every query change guarantees only the latest query's response is applied.

Stage 4: Browser Internals and Performance

This is the stage that turns a framework user into a frontend engineer. In India, performance is not academic: a large share of users are on mid-range Android devices and variable mobile networks.

How the browser renders

HTML ──► DOM ─┐ ├──► Render tree ──► Layout ──► Paint ──► Composite CSS ──► CSSOM┘ ▲ JS can modify DOM/CSSOM ─┘ (forcing style recalc / layout again)
  • The critical rendering path, render-blocking CSS and parser-blocking scripts (defer vs async).
  • Reflow (layout) vs repaint vs compositing; layout thrashing from interleaved reads and writes.
  • The main thread: why long tasks (over 50 ms) make the page feel frozen.
  • Caching: HTTP cache headers, service workers, CDNs.

Core Web Vitals

≤ 2.5 s
LCP: loading
≤ 200 ms
INP: responsiveness
< 0.1
CLS: visual stability
p75
Measured percentile

Interaction to Next Paint (INP) replaced First Input Delay as a Core Web Vital in March 2024. See Google's web.dev Core Web Vitals documentation for current definitions.

ProblemCommon causesFixes
Slow LCPLarge hero image, render-blocking resources, slow server response, client-only renderingOptimized and correctly sized images, preload the LCP resource, SSR/SSG, CDN
Poor INPLong JavaScript tasks, heavy re-renders, large third-party scriptsCode splitting, breaking up long tasks, memoization where measured, deferring third parties, virtualizing long lists
High CLSImages and ads without dimensions, late-loading fonts, injected bannersExplicit width/height or aspect-ratio, reserved space, font-display strategies
Large bundlesUnused dependencies, no code splitting, heavy date or chart librariesBundle analysis, route-level splitting, lighter alternatives, tree shaking

Learn to measure before optimizing: Lighthouse for lab data, the Chrome DevTools Performance panel for traces, and real-user monitoring for field data. An interviewer will be far more impressed by "LCP went from 4.1 s to 2.2 s on a throttled mid-range device after preloading the hero image and moving to SSG" than by a list of optimization techniques.

Stage 5: Accessibility, Testing and Security

Accessibility (a11y)

  • Keyboard navigation and visible focus; focus management in modals and route changes.
  • Semantic HTML first, ARIA only when needed (and correctly).
  • Colour contrast, text alternatives, form labels and error announcements.
  • Testing with a screen reader (NVDA on Windows, VoiceOver on Mac/iOS, TalkBack on Android) and automated checkers like axe.
  • The WCAG guidelines at a working level.

Testing

  • Unit and component tests with Vitest or Jest and Testing Library (test behaviour, not implementation).
  • End-to-end tests with Playwright or Cypress for critical flows like login and checkout.
  • Visual regression testing for design systems.

Frontend security

  • XSS and why dangerouslySetInnerHTML and innerHTML with user input are dangerous; Content Security Policy.
  • CSRF, cookie flags (HttpOnly, Secure, SameSite), where to store tokens and the trade-offs.
  • CORS: what it protects and what it does not.

Internationalization

For Indian products, supporting Hindi and regional languages is common. Learn i18n libraries, locale-aware number and date formatting (Intl.NumberFormat('en-IN') formats 1234567 as 12,34,567), and layout that handles longer strings.

Stage 6: Frontend System Design

Frontend system design rounds ask you to design the client side of a product. Common prompts: news feed, autocomplete/typeahead, chat application, image carousel or gallery, e-commerce product listing with filters, Google Docs-style editor, video player, notifications panel, or a design system.

A structure that works in the round

  1. Requirements. Functional (what the user does) and non-functional: devices, network conditions, offline support, accessibility, SEO, i18n, scale of data on screen.
  2. Component architecture. Break the UI into components; identify which are reusable and which own state.
  3. Data model and state. What lives in server cache, global client state, local component state, and the URL. Normalize entities when they appear in multiple places.
  4. API interface. Endpoints or GraphQL queries the client needs, pagination style (cursor for feeds), real-time channel (WebSocket or SSE; see WebSockets vs SSE vs long polling).
  5. Rendering strategy. CSR, SSR, SSG or a hybrid, and why.
  6. Performance. Virtualized lists, image strategy, code splitting, prefetching, caching and optimistic updates.
  7. Accessibility, security, i18n, observability. Error tracking and real-user monitoring.

Worked mini-example: an infinite news feed

DecisionChoice and reason
PaginationCursor-based (?after=<postId>) so new posts at the top do not cause duplicates or skipped items
Loading triggerIntersectionObserver on a sentinel element near the bottom, prefetching the next page early
RenderingList virtualization once the feed exceeds a few hundred items to keep DOM size and memory bounded
StateNormalized post and user entities in a server-state cache; likes as optimistic updates with rollback on failure
New posts"N new posts" pill fed by SSE or polling, instead of shifting content under the user's thumb (protects CLS)
MediaResponsive images, lazy loading below the fold, fixed aspect-ratio placeholders
AccessibilityFeed semantics, keyboard navigation between posts, announced loading states

Many backend-focused system design problems have a frontend counterpart. Reading the backend design for the same product, such as search autocomplete or news feed, helps you design a sensible API contract in the frontend round.

A Stage-by-Stage Timeline and Projects

At around 12 to 15 hours a week, this is a realistic plan. People who already program will move faster through the first two stages; nobody should rush Stage 2.

StageDurationProject that proves it
1. Platform3 to 5 weeksPixel-accurate, responsive, keyboard-navigable recreation of a real product page, no CSS framework
2. JavaScript6 to 8 weeksA utilities library with tests: debounce, throttle, deep clone, Promise.all, an event emitter
3. React6 to 8 weeksA TypeScript app with routing, server-state caching, forms and optimistic updates
4. Performance4 weeksTake your Stage 3 app and document measured LCP, INP and bundle-size improvements
5. Quality3 to 4 weeksFull keyboard and screen-reader pass, component and end-to-end tests, CSP headers
6. DesignOngoingWritten design docs for 4 to 5 classic frontend system design prompts

Run DSA practice alongside from Stage 3 onwards if you are targeting product companies. Our web development roadmap covers enough backend to build the APIs your frontend projects need, and the backend roadmap is useful later for full-stack or API-design conversations.

Frontend Interview Topics by Round

Processes differ by company; confirm with your recruiter. Typical rounds at Indian product companies:

Round type

JavaScript fundamentals

Output prediction, closures, this, event loop, polyfills (bind, Promise.all, Array.prototype.reduce), debounce and throttle.

Round type

Machine coding

Build autocomplete, nested comments, file explorer, tabs, star rating, kanban board or a progress bar queue in 60 to 120 minutes. See our machine coding guide.

Round type

DSA

Usually easy-to-medium problems; arrays, strings, hashing, trees (the DOM is a tree), recursion. See DSA roadmap.

Round type

Framework deep dive

React rendering, hooks, state management choices, performance profiling. See React and JS questions.

Round type

Frontend system design

Design a feed, chat, editor or component library with the structure above.

Round type

Hiring manager

Ownership, collaboration with design and backend, a performance or accessibility win you drove.

What machine coding evaluators look for

  • A working core flow first, then edge cases (empty states, errors, loading).
  • Sensible component boundaries and state placement.
  • Keyboard support and basic accessibility.
  • Readable code: naming, small functions, no giant component.
  • Being able to explain what you would add with more time.

Expectations by Level

LevelExpected depth
Fresher / SDE-1Solid HTML/CSS/JS fundamentals, one framework, can build features with guidance, DSA basics
SDE-2Owns features end to end, performance and accessibility awareness, testing, can reason through frontend system design for a feature
SDE-3 / SeniorDesigns frontend architecture across teams, design systems, performance budgets, monitoring, mentoring, influences API design
StaffPlatform-level decisions: build tooling, micro-frontends or monorepo strategy, cross-org performance and quality initiatives

Mistakes to Avoid on the Frontend Path

  1. Learning React before JavaScript. Most confusing React bugs are JavaScript closure or reference-equality bugs in disguise.
  2. Treating CSS as an afterthought. Weak CSS shows immediately in machine coding rounds.
  3. Ignoring the network and device reality. Test on throttled networks and low-end devices, not only on a fast laptop.
  4. Using useMemo and useCallback everywhere. Memoization has costs; profile first.
  5. Skipping accessibility. It is increasingly asked in interviews and is part of doing the job properly.
  6. Chasing every new framework. Concepts transfer; depth in one framework plus strong platform fundamentals beats shallow knowledge of five.
  7. Neglecting DSA. Product company frontend loops usually include it.
💡
A portfolio that stands outInstead of another clone, take one app and make it excellent: Lighthouse scores you can show, full keyboard support, a virtualized list, offline support with a service worker, and a short write-up of the trade-offs. That single project answers most of a frontend interviewer's questions before they ask them.

Frequently Asked Questions

What should I learn to become a frontend developer?▾
HTML, CSS and JavaScript in depth first, then TypeScript and one framework (React is the most in demand in India), then browser internals, performance, accessibility and testing. For product company roles, add DSA and, from about two years of experience, frontend system design.
What is frontend system design?▾
It is an interview round where you design the client side of a product, such as a news feed, autocomplete or chat UI. You discuss requirements, component architecture, state and data flow, API contracts, performance, accessibility and offline or real-time behaviour, rather than databases and servers.
Do frontend developers need DSA in India?▾
At most product companies and big tech, yes. Frontend candidates usually face at least one DSA round, often at a slightly lighter bar than backend roles, plus JavaScript, machine coding and design rounds. Startups may replace DSA with practical rounds.
What are Core Web Vitals?▾
They are Google's user-experience metrics: Largest Contentful Paint (loading), Interaction to Next Paint (responsiveness, which replaced First Input Delay in 2024) and Cumulative Layout Shift (visual stability). Good thresholds are LCP within 2.5 seconds, INP within 200 milliseconds and CLS below 0.1, measured at the 75th percentile of page loads.
Is Next.js necessary for frontend jobs?▾
It is increasingly common, especially for SEO-sensitive and content-heavy products, so it is worth learning after React. Understand the underlying concepts (server-side rendering, static generation, hydration, server components) because interviewers ask about them independent of any framework.
What is asked in a frontend machine coding round?▾
You build a working UI component or small app in 60 to 120 minutes, such as an autocomplete, a nested comments section, an infinite scroll feed, a star rating or a kanban board. You are evaluated on working functionality, component structure, state handling, edge cases, accessibility and code readability.
Is frontend a good career compared to backend in India?▾
Both have strong demand and comparable pay at product companies for equivalent levels. Frontend leads toward UI architecture, design systems, performance and web platform expertise. Choose the side whose problems you enjoy, then go deep.

Crack Frontend Interviews at Product Companies

Prepflix prepares frontend engineers for JavaScript deep dives, machine coding, DSA and frontend system design rounds.

Explore the Prepflix Course →
Pranjal Jain
Pranjal Jain

Ex-Microsoft SDE · IIT Kanpur · Founder of Prepflix. Helps engineers crack startup and product company interviews across India.