π Interview Prep
Web & Frontend
HTML, CSS layout, the DOM, HTTP, browsers, React, security and accessibility: front-end and full-stack interview staples.
π Learn it from scratch
Visual, hands-on lessons for every pattern in this topic. Do the lesson, then come back and the questions click.
100 questions, most asked first
Ordered so the most useful questions for learning each pattern come first.
All patternsHTTP & APIsStorage & cachingBox modelFlexboxWeb securityReactHTMLAccessibilityResponsive designCSS Grid & positioningBrowser & performanceState managementFormsDOM & events
#1π¬What happens when you type a URL and press Enter?HTTP & APIsMediumFree#2π¬What makes an API RESTful?HTTP & APIsEasyFree#3π¬Cookies vs localStorage vs sessionStorageStorage & cachingEasyFree#4π¬The CSS box modelBox modelEasyFree#5π¬Flexbox vs CSS GridFlexboxEasyFree#6π¬CSS specificity and the cascadeBox modelMediumFree#7π¬HTTP methods and status codesHTTP & APIsEasyFree#8π¬What is CORS?Web securityMediumFree#9π¬Cross-site scripting (XSS)Web securityMediumFree#10π¬Cross-site request forgery (CSRF)Web securityMediumFreeπUnlock 90 more Web & Frontend questions Β· all 1,200 questions for $39/year (about 11Β’ a day)See full access#11π¬How does HTTPS work?Web securityMediumπ#12π¬Virtual DOM and reconciliationReactMediumπ#13π¬State vs propsReactEasyπ#14π¬How does useEffect work?ReactMediumπ#15π¬Why do lists need keys?ReactEasyπ#16π¬Controlled vs uncontrolled inputsReactMediumπ#17π¬Semantic HTMLHTMLEasyπ#18π¬Making a website accessibleAccessibilityMediumπ#19π¬Responsive designResponsive designEasyπ#20π¬CSS position valuesCSS Grid & positioningEasyπ#21π¬display none vs visibility hidden vs opacity 0Box modelEasyπ#22π¬The critical rendering pathBrowser & performanceMediumπ#23π¬Reflow vs repaint (layout thrashing)Browser & performanceMediumπ#24π¬Core Web VitalsBrowser & performanceMediumπ#25π¬Lazy loading images and codeBrowser & performanceEasyπ#26π¬HTTP caching (Cache-Control, ETag)Storage & cachingMediumπ#27π¬Service workers and PWAsStorage & cachingMediumπ#28π¬WebSockets vs polling vs Server-Sent EventsHTTP & APIsMediumπ#29π¬Session cookies vs JWTsWeb securityMediumπ#30π¬How does "Sign in with Google" work?Web securityMediumπ#31π¬SSR vs CSR vs SSG (and ISR)ReactMediumπ#32π¬SEO for web developersHTMLEasyπ#33π¬The rules of hooksReactMediumπ#34π¬useMemo and useCallbackReactMediumπ#35π¬Context vs Redux vs other state librariesState managementMediumπ#36π¬Making a slow React app fastReactMediumπ#37π¬Form validation on the client and the serverFormsEasyπ#38π¬CSS units (px, em, rem, %, vw/vh)Responsive designEasyπ#39π¬Why isn't my z-index working?CSS Grid & positioningMediumπ#40π¬Pseudo-classes vs pseudo-elementsBox modelEasyπ#41π¬CSS transitions vs animations vs JS animationBrowser & performanceEasyπ#42π¬Organizing CSS at scale (BEM, CSS modules, Tailwind)Box modelMediumπ#43π¬DOM APIs every frontend dev should knowDOM & eventsEasyπ#44π¬Event bubbling and delegationDOM & eventsMediumπ#45β¨οΈfetch and error handlingHTTP & APIsMediumπ#46π¬Loading, empty and error statesState managementEasyπ#47π¬REST vs GraphQLHTTP & APIsMediumπ#48π¬Designing API paginationHTTP & APIsMediumπ#49π¬Idempotent APIs and retriesHTTP & APIsMediumπ#50π¬401 vs 403 (and 404 for privacy)HTTP & APIsEasyπ#51π¬HTTP/1.1 vs HTTP/2 vs HTTP/3HTTP & APIsMediumπ#52π¬How DNS worksHTTP & APIsMediumπ#53π¬What is a CDN?Storage & cachingEasyπ#54π¬Content Security Policy (CSP)Web securityMediumπ#55π¬ClickjackingWeb securityEasyπ#56π¬The same-origin policyWeb securityMediumπ#57π¬Storing passwords safelyWeb securityMediumπ#58β¨οΈRate limiting an APIWeb securityMediumπ#59π¬When and how to use ARIAAccessibilityMediumπ#60π¬Responsive and optimized imagesBrowser & performanceMediumπ#61π¬Loading web fonts without hurting performanceBrowser & performanceMediumπ#62π¬What is hydration?ReactMediumπ#63π¬React Server ComponentsReactHardπ#64π¬Lifting state up and prop drillingState managementEasyπ#65π¬Error boundariesReactMediumπ#66π¬Testing frontend codeReactMediumπ#67π¬Debugging with browser DevToolsBrowser & performanceEasyπ#68π¬requestAnimationFrameBrowser & performanceMediumπ#69π¬IntersectionObserverDOM & eventsMediumπ#70π¬Internationalization (i18n)HTMLMediumπ#71π¬Progressive enhancementHTMLMediumπ#72π¬Cross-browser compatibilityResponsive designEasyπ#73π¬The viewport meta tagResponsive designEasyπ#74π¬Build a layout with CSS GridCSS Grid & positioningMediumπ#75π¬How do you center a div?FlexboxEasyπ#76π¬flex-grow, flex-shrink and flex-basisFlexboxMediumπ#77π¬CSS custom properties and dark modeResponsive designMediumπ#78π¬Form submission and preventDefaultFormsEasyπ#79π¬Implementing infinite scrollDOM & eventsMediumπ#80π¬Handling file uploadsFormsMediumπ#81π¬Web Components and the Shadow DOMDOM & eventsMediumπ#82π¬Running untrusted code safely in an iframeWeb securityHardπ#83π¬Cookie security attributesWeb securityMediumπ#84π¬HTTP security headersWeb securityMediumπ#85π¬How client-side routing worksBrowser & performanceMediumπ#86π¬Frontend system design: an autocomplete search boxBrowser & performanceHardπ#87π¬Micro-frontendsState managementHardπ#88π¬Monitoring a frontend in productionBrowser & performanceMediumπ#89β¨οΈOptimistic UI updatesState managementMediumπ#90π¬IndexedDB and offline dataStorage & cachingMediumπ#91π¬Mobile-first designResponsive designEasyπ#92π¬Accessible formsAccessibilityEasyπ#93π¬Color contrast and accessible colorAccessibilityEasyπ#94π¬Keyboard navigation and focus managementAccessibilityMediumπ#95π¬Building an accessible modal dialogAccessibilityMediumπ#96π¬Performance budgetsBrowser & performanceMediumπ#97π¬Third-party scripts (analytics, ads, widgets)Web securityMediumπ#98π¬Walk me through a frontend you builtState managementMediumπ#99π¬script, async, defer and type=moduleBrowser & performanceMediumπ#100β¨οΈA search box that doesn't spam the APIDOM & eventsMediumπ