HTML/CSS (Interview Prep)
A structured roadmap of HTML/CSS fundamentals that matter most in frontend interviews. Start top-to-bottom.
Series: HTML/CSS
Start here
CSS Specificity: How Styles Actually Win
Specificity rules, common traps, and practical strategies to avoid fighting CSS.
How to Study the HTML/CSS Track
Strong HTML and CSS fundamentals separate senior frontend engineers from framework-only developers. Live UI coding rounds and accessibility reviews routinely test whether you choose semantic landmarks that work with screen readers and keyboard navigation, understand how the browser computes cascade specificity and stacking contexts, and build resilient layouts without fragile pixel hacks.
This track covers the complete layout and semantics foundation tested in frontend interviews: semantic HTML5 document structure, the CSS box model and box-sizing rules, cascade and specificity calculation, Flexbox vs two-dimensional CSS Grid architecture, positioning and z-index stacking contexts, responsive fluid typography, container queries, and WCAG keyboard/ARIA accessibility patterns.
What Interviewers Evaluate in This Track
- Choosing between Flexbox (one-dimensional content distribution) and CSS Grid (two-dimensional page and card layouts)
- Resolving specificity conflicts, stacking context bugs (z-index, transform, isolation), and containing-block traps
- Building accessible forms, modals, and interactive widgets with semantic HTML, focus management, and ARIA attributes
Roadmap (9)
Practice HTML/CSS articles →- 1
CSS Specificity: How Styles Actually Win
2 min readSpecificity rules, common traps, and practical strategies to avoid fighting CSS.
- 2
The CSS Box Model (Deep but Practical)
2 min readContent, padding, border, margin; box-sizing; and how it affects layout calculations.
- 3
Flexbox: Aligning Layouts the Right Way
2 min readFlex container vs items, main/cross axis, and alignment properties that interviewers ask about.
- 4
CSS Grid: Two-Dimensional Layout
2 min readGrid tracks, fr units, areas, and when Grid beats Flexbox.
- 5
Responsive Design: Media Queries, Fluid Layouts, and Breakpoints
1 min readHow to build layouts that work across devices; practical breakpoint strategy.
- 6
Accessibility Basics for Frontend Interviews
4 min readSemantic HTML, keyboard navigation, focus management, labels, ARIA basics, and the accessibility mistakes interviewers look for.
- 7
How to Center a Div (All Common Ways)
1 min readThe interview classic: centering with flexbox, grid, absolute positioning, and margin auto.
- 8
CSS Positioning: static/relative/absolute/fixed/sticky
2 min readHow positioning works, stacking contexts, and what trips people up in interviews.
- 9
Modern CSS Features You Should Know
1 min readclamp(), container queries, :has(), logical properties, and modern layout utilities.