What Are the Three Pillars of Frontend Development?
The three pillars of frontend development are HTML, CSS, and JavaScript. HTML defines the structure and meaning of the content. CSS defines how it looks. JavaScript defines how it behaves when the user interacts with it. Every browser understands exactly these three, and every frontend framework, React and Vue included, produces these three in the end. A frontend interview tests each pillar separately and then tests whether you can combine them.
HTML: Structure
HTML, HyperText Markup Language, marks up content as elements: headings, paragraphs, lists, links, images, forms, tables. The browser reads the HTML into the DOM, the Document Object Model, which is the tree of nodes that CSS styles and JavaScript changes.
The part that separates a beginner from a professional is semantic HTML. That means using <nav>, <main>, <article>, <button> and <label> for what they mean instead of <div> for everything. Semantic elements give screen readers, search engines and keyboard users the structure without extra work. That is why accessibility questions in interviews are really HTML questions.
<main> <h1>Order summary</h1> <form id="order"> <label for="qty">Quantity</label> <input id="qty" type="number" min="1" value="1"> <button type="submit">Place order</button> </form> <p id="status" aria-live="polite"></p> </main>
CSS: Presentation
CSS, Cascading Style Sheets, sets layout, color, typography, spacing and motion. The word cascading names the rule that decides which of several conflicting declarations wins: origin first, then specificity, then source order. Specificity is a score computed from the selector: an id outweighs any number of classes, and a class outweighs any number of element names.
There are four core CSS topics: the box model (content, padding, border, margin) and the two layout systems, Flexbox for one dimension and Grid for two. The other two are positioning, and responsive design with media queries and relative units.
#order { display: flex; gap: 12px; align-items: center; } button { padding: 8px 16px; border: none; border-radius: 4px; background: #1a73e8; color: white; } @media (max-width: 600px) { #order { flex-direction: column; align-items: stretch; } }
JavaScript: Behavior
JavaScript runs in the browser and changes the page after it loads. It handles clicks and keystrokes, validates input, fetches data from a server, and updates the DOM without a reload. The language topics that matter most are closures, the this keyword, prototypes, and asynchronous code with promises and async/await. The browser topics are the event loop, event delegation, and the DOM API.
const form = document.getElementById("order"); const status = document.getElementById("status"); form.addEventListener("submit", async (event) => { event.preventDefault(); const qty = Number(document.getElementById("qty").value); if (qty < 1) { status.textContent = "Quantity must be at least 1."; return; } const response = await fetch("/api/orders", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ qty }), }); status.textContent = response.ok ? "Order placed." : "Something went wrong."; });
The three listings above are one working feature. HTML declares the form. CSS lays it out and adapts it to a narrow screen. JavaScript validates the input and sends the request to the server.
How Each Pillar Is Tested in a Frontend Interview
| Pillar | Typical question | What the interviewer checks |
|---|---|---|
| HTML | Build this form or card markup | Semantic elements, labels tied to inputs, heading order, alt text |
| CSS | Center this element; build this layout; why does this rule not apply | Box model, Flexbox and Grid, specificity, responsive units |
| JavaScript | Implement debounce; explain this closure; what does this log and why | Scope, async order, event loop, DOM updates |
| All three | Build a small widget (autocomplete, tabs, modal) in 45 minutes | Splitting structure, style and behavior; accessibility; clean state handling |
HTML questions look easy and are where the most candidates lose points. An interviewer who sees a <div onclick> instead of a <button> has learned something about the candidate. CSS questions test whether you can predict the browser, not whether you can recite properties. Expect to explain why a margin collapsed or why a z-index had no effect. JavaScript questions are the longest part, and the standard set is small. Implement debounce or throttle, Promise.all, deep clone, and an event emitter, and explain the output order of a mix of setTimeout calls and promises.
Frameworks come after the pillars. A React question is really a JavaScript question about state and rendering, and a styled-components question is really a CSS question. Candidates who know the three pillars can learn any framework in weeks; the reverse is not true.
How to Prepare
- Write the three pillars separately for one small widget, such as a tabs component. Then build it again with a framework and compare the two.
- Drill the standard JavaScript implementations: debounce, throttle,
Promise.all, deep clone, an event emitter, and a small DOM traversal. - Coding rounds for frontend roles still include algorithm questions. Grokking the Coding Interview covers the patterns that appear, most often on arrays, strings and trees.
- Senior frontend interviews add a system design round on topics such as a news feed or an autocomplete service. Grokking the System Design Interview is the standard preparation.
- Rehearse under time. A mock interview shows whether you can build and explain a widget in 45 minutes.

GET YOUR FREE
Coding Questions Catalog

$99

$197

$72