๐ 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
Ranked by how often each question comes up in real interviews. #1 is the most common.
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๐