1. HTML Fundamentals
What is HTML and why is it important?
What is HTML and why is it important?
Explain semantic HTML
Explain semantic HTML
<header>, <footer>, <article> that describe their role in the document, improving accessibility and SEO.What are meta tags?
What are meta tags?
Difference between block and inline elements?
Difference between block and inline elements?
<div>, <p>) start on new lines and take full width. Inline elements (like <span>, <a>) sit within text without breaking flow.Explain the role of the DOCTYPE declaration
Explain the role of the DOCTYPE declaration
<!DOCTYPE html> tells the browser to use the HTML5 standard mode, ensuring consistent rendering across browsers.2. CSS & Styling
What is the difference between relative, absolute, and fixed positioning?
What is the difference between relative, absolute, and fixed positioning?
Absolute: positions relative to the nearest positioned ancestor.
Fixed: sticks to viewport regardless of scrolling.
Explain Flexbox
Explain Flexbox
display: flex, justify-content, align-items, flex-direction.Explain CSS Grid
Explain CSS Grid
display: grid and properties like grid-template-rows, grid-template-columns, gap.What is specificity in CSS?
What is specificity in CSS?
How do you optimize CSS performance?
How do you optimize CSS performance?
3. JavaScript Core Concepts
Explain hoisting in JavaScript
Explain hoisting in JavaScript
Difference between var, let, and const
Difference between var, let, and const
var has function scope and can be re-declared;let and const have block scope;const cannot be reassigned after initialization.What is event delegation?
What is event delegation?
Explain closures
Explain closures
Difference between synchronous and asynchronous code
Difference between synchronous and asynchronous code
Asynchronous: allows tasks (like fetching data) to run in the background using Promises or async/await.
4. React Fundamentals
What is React?
What is React?
Explain virtual DOM
Explain virtual DOM
What are props and state?
What are props and state?
Difference between controlled and uncontrolled components
Difference between controlled and uncontrolled components
Uncontrolled components use refs to access DOM values directly.
What is the purpose of keys in lists?
What is the purpose of keys in lists?
key when rendering lists.5. React Hooks & Lifecycle
Explain useEffect
Explain useEffect
What is useMemo and useCallback?
What is useMemo and useCallback?
useMemo memoizes computed values, useCallback memoizes functions. Both prevent unnecessary re-renders for performance.How to handle forms in React?
How to handle forms in React?
onChange and state, or libraries like Formik/React Hook Form for validation and handling.Explain context API
Explain context API
createContext and useContext.How does React reconciliation work?
How does React reconciliation work?
6. Next.js & Advanced Frontend
What is Next.js?
What is Next.js?
Explain SSR, SSG, and CSR
Explain SSR, SSG, and CSR
SSG: Pre-rendered at build time for static sites.
CSR: Fully client-rendered via React.
What is dynamic routing in Next.js?
What is dynamic routing in Next.js?
[param].js inside the pages folder. Example: pages/users/[id].js for dynamic user pages.How to optimize performance in Next.js?
How to optimize performance in Next.js?
next/image for lazy loading, getStaticProps for pre-rendering, code-splitting, and caching via headers.How to handle environment variables in Next.js?
How to handle environment variables in Next.js?
.env.local and access via process.env.NEXT_PUBLIC_... for client-side variables.7. TypeScript in Frontend
What is TypeScript and why use it?
What is TypeScript and why use it?
Explain interfaces vs types
Explain interfaces vs types
interface supports declaration merging, while type can define unions and complex types.What are generics?
What are generics?
function identity<T>(arg: T): T { return arg; }What are utility types?
What are utility types?
Partial, Pick, Omit, Readonly that modify existing types dynamically.How does TypeScript improve React development?
How does TypeScript improve React development?
interface Props { name: string } const Hello = ({ name }: Props) => <div>{name}</div>8. Frontend Performance & Optimization
How to improve frontend performance?
How to improve frontend performance?
Explain lazy loading in React
Explain lazy loading in React
React.lazy() and Suspense. Reduces initial load time.What is debouncing and throttling?
What is debouncing and throttling?
What is bundle splitting?
What is bundle splitting?
Explain image optimization techniques
Explain image optimization techniques
srcset), and lazy loading (loading='lazy'). Next.js Image handles this automatically.9. Accessibility & Testing
What is web accessibility (a11y)?
What is web accessibility (a11y)?
How do you test React components?
How do you test React components?
screen.getByText('Submit').Explain snapshot testing
Explain snapshot testing
How to ensure accessibility in forms?
How to ensure accessibility in forms?
What tools can you use for accessibility testing?
What tools can you use for accessibility testing?
10. Deployment & Best Practices
How to deploy React or Next.js apps?
How to deploy React or Next.js apps?
npm run build, then upload static files or SSR output.How to secure frontend apps?
How to secure frontend apps?
Explain CI/CD for frontend apps
Explain CI/CD for frontend apps
How to manage environment variables securely?
How to manage environment variables securely?
.env out of version control, use deployment environment configs (Vercel, Netlify secrets).Best practices for maintainable frontend code?
Best practices for maintainable frontend code?
Conclusion & Interview Tips
This guide covers key frontend interview topics — from HTML to React, Next.js, and TypeScript.Preparation Tips
- Master fundamentals (HTML, CSS, JS) before frameworks
- Build real projects (e.g., dashboards, portfolios, e-commerce)
- Focus on clean UI/UX and performance
- Practice live coding and debugging
During the Interview
- Talk through your thought process
- Explain trade-offs and optimizations
- Discuss scalability and maintainability
- Be clear and confident