We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook, Instagram and Microsoft search (Bing) work. They are set only if you accept. See our Privacy Policy for details.
Practice frontend fundamentals interview questions on semantic HTML and accessibility, CSS layout with flexbox and grid, specificity and the cascade, the browser rendering pipeline, Core Web Vitals, browser security and HTTP caching.
Answer a real Web Fundamentals interview question before you browse the list. No signup needed.
An ABC defines __subclasshook__ to return True when the candidate class has a method quack. A class Duck is never registered with the ABC and never inherits from it, but it does define quack. What does issubclass(Duck, MyABC) return?
Practice in a session
10 questions from Web Fundamentals, one after another, then your score and streak.
Semantic HTML and accessibility, the CSS box model, flexbox, grid and the cascade, how the browser turns HTML and CSS into pixels, web performance and Core Web Vitals, browser security (same-origin policy, CORS, CSP, cookie flags) and HTTP caching. Framework questions sit on top of these.
Specificity is compared as a tuple: inline styles beat IDs, IDs beat classes, attributes and pseudo-classes, and those beat element selectors and pseudo-elements. If specificity ties, the rule that comes later wins. !important and cascade layers sit above normal specificity, and :where() contributes zero specificity.
Changing geometry - size, position, fonts, or content that affects layout - forces layout (reflow), then paint. Changing only colours repaints without layout. Changing transform or opacity can often be handled by the compositor alone. Reading a layout property such as offsetHeight right after a write forces a synchronous layout, which is the cause of layout thrashing.
Largest Contentful Paint (how quickly the main content renders, good under 2.5 s), Interaction to Next Paint (how quickly the page responds to input, good under 200 ms; it replaced First Input Delay in 2024) and Cumulative Layout Shift (how much content jumps around, good under 0.1), each measured at the 75th percentile of real visits.
CORS is a way for a server to relax the same-origin policy: it tells the browser which other origins may read its responses. It does not stop a request from being sent, and it does not protect a server from non-browser clients. Preflight OPTIONS requests are sent for non-simple methods and headers.