← All topics

🌐 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.

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