🚀 Top 100 Frontend Development Interview Questions
🧠 Core HTML & CSS
1. What are the roles of HTML, CSS, and JavaScript?
2. What are semantic HTML elements and why use them?
3. What is the difference between <div> and <span>?
4. What is the difference between id and class?
5. Explain the CSS box model.
6. What is the difference between margin and padding?
7. What is display: block, inline, and inline‑block?
8. What is a CSS reset or normalize?
9. What are CSS pseudo‑classes and pseudo‑elements?
10. How do you center a div both horizontally and vertically?
🎨 Layout, Responsiveness & Accessibility
11. What is responsive web design?
12. What are CSS media queries?
13. What is mobile‑first vs desktop‑first?
14. What is Flexbox and when do you use it?
15. What is CSS Grid?
16. What is the difference between Flexbox and Grid?
17. What is the viewport meta tag?
18. What is a CSS framework (e.g., Bootstrap, Tailwind)?
19. What is web accessibility (a11y)?
20. What are ARIA roles and attributes?
⚡ JavaScript Fundamentals
21. What is scope in JavaScript?
22. What is the difference between let, const, and var?
23. What is a closure?
24. What is the this keyword?
25. What is the difference between == and ===?
26. What is hoisting?
27. What is the event loop?
28. What are Promises and why use them?
29. What is async/await?
30. What is the difference between map(), filter(), and reduce()?
🔗 DOM, Events & Browser APIs
31. What is the DOM?
32. How do you select an element in JavaScript?
33. How do you listen to click, change, or key events?
34. What is event delegation?
35. What is event bubbling vs capturing?
36. What is localStorage and sessionStorage?
37. How does fetch() work and how do you handle errors?
38. What is CORS and how do you solve common issues?
39. What is the difference between GET and POST?
40. How do you debug JavaScript in the browser dev tools?
🛠️ Build Tools, Workflow & Testing
41. What is npm and package.json?
42. What is a module bundler like Webpack or Vite?
43. What is Babel and why is it used?
44. What is tree‑shaking?
45. What is ESLint / Prettier?
46. What is Git and how do you use it in frontend projects?
47. What is CI/CD for a frontend app?
48. What is unit testing in frontend (Jest, Vitest, etc.)?
49. What is integration or end‑to‑end testing?
50. How do you manage environment variables on the frontend?
🖌️ UI, UX & Performance
51. What is user‑centered design in frontend?
52. What are UX best practices for web UI?
53. What is lazy loading of images and components?
54. How do you reduce page load time?
55. What is code splitting and how do you use it?
56. How do you optimize CSS and bundle size?
57. What is the critical rendering path?
58. How do you optimize images for the web?
59. How do you handle font loading and FOIT / FOUT?
60. How do you measure performance (LCP, FID, CLS)?
🌀 Frontend Frameworks (React, Vue, Angular)
61. What is a component‑based UI framework?
62. What is the difference between React, Vue, and Angular?
63. What is JSX?
64. What are props and state in React?
65. What is the Virtual DOM?
66. What are React Hooks?
67. What is React Router / Vue Router?
68. What is state management (Redux, Pinia, NgRx)?
69. What is server‑side rendering (Next.js, Nuxt, Angular SSR)?
70. What is hydration in SSR?
🚥 Routing, Forms, and APIs
71. What is client‑side routing?
72. How do you handle form validation and error states?
73. What is input sanitization and why is it important?
74. How do you build a reusable form component?
75. How do you implement search or autocomplete?
76. How do you connect to a REST API?
77. How do you connect to a GraphQL API?
78. How do you handle loading, success, and error states?
79. How do you manage API keys and auth tokens securely?
80. How do you handle pagination and i