Developer Interview Q&A
Common technical interview questions for web development, CS fundamentals, and programming — with clear answers.
About This Section
Technical interviews are a critical step in landing a developer job. This section covers the most frequently asked questions across web development, CS fundamentals, and general programming — with clear, concise answers to help you prepare confidently.
HTML Interview Questions
- What is the difference between <div> and <span>?
<div>is a block-level element;<span>is inline. Use div for layout sections, span for styling inline text. - What is semantic HTML?
Using HTML elements that convey meaning — like<header>,<nav>,<article>,<footer>— rather than generic divs. - What is the purpose of the <meta viewport> tag?
It controls the layout on mobile browsers, enabling responsive design.
CSS Interview Questions
- What is the box model?
Every element is a box with: content → padding → border → margin from inside out. - Explain CSS specificity.
Specificity determines which CSS rule wins when multiple rules target the same element. ID > Class > Tag. - What is Flexbox and when would you use it?
A one-dimensional layout model for arranging items in a row or column. Use it for navigation bars, card layouts, and centering content.
JavaScript Interview Questions
- What is the difference between var, let, and const?
varis function-scoped and hoisted.letandconstare block-scoped.constcan't be reassigned (but its properties can be mutated). - What is a closure?
A function that remembers the variables from its outer scope even after that scope has finished executing. - What is the event loop?
JavaScript is single-threaded. The event loop handles asynchronous operations by queuing callbacks and executing them when the call stack is empty. - What is the difference between == and ===?
==performs type coercion before comparing.===compares both value and type strictly. Always prefer===.
CS Fundamentals Questions
- What is the difference between a process and a thread?
A process has its own memory space; threads share memory within a process. Threads are lighter but require careful synchronization. - What is Big O notation?
A way to describe algorithm efficiency. O(n) means time grows linearly with input size. O(1) is constant time regardless of input. - What is REST?
Representational State Transfer — an architectural style for building APIs using HTTP methods (GET, POST, PUT, DELETE).
What's Next?
Test your knowledge with Quizzes, or review key syntax with Cheat Sheets.