Web Errors
50 errors
Common web development errors and how to fix them.
50 / 50
- 1
Broken Image
Your `<img>` tag points to a file that doesn't exist, is in the wrong location, or failed to load — the browser shows a broken image icon.
- 2
CSS Selector Not Matching
Your CSS rule has no effect because the selector doesn't match any element — or a more specific rule overrides it in the cascade.
- 3
404 Not Found
The page or resource you requested doesn't exist at that URL — the path is wrong, the file was removed, or the route isn't configured.
- 4
Mixed Content
Your secure (HTTPS) page is trying to load an insecure (HTTP) resource, which the browser blocks for security reasons.
- 5
CORS Error
The browser blocked your cross-origin request because the server didn't send the right CORS headers to permit it.
- 6
JavaScript Not Loading
Your script tag points to a file that doesn't exist, has a syntax error, or is blocked from loading — the page's interactivity breaks.
- 7
CSS Not Loading
Your `<link>` tag points to a CSS file that doesn't exist or failed to load, so the page appears unstyled.
- 8
Flexbox Not Working
Your flex-direction, justify-content, or align-items properties are not working because the container is missing display: flex.
- 9
Z-Index Not Working
Your z-index value is not working because the element needs a position value other than static (the default).
- 10
CSS !important Not Working
Your !important rule is not winning because another rule with !important has higher specificity, or the rule is not matching.
- 11
Event Listener Not Firing
Your event listener is not firing because the element does not exist when the listener is attached, or the event name is wrong.
- 12
JSON Parse Error
JSON.parse fails because the input string is not valid JSON — usually due to single quotes, trailing commas, or unquoted keys.
- 13
Fetch Network Error
Your fetch request is failing with a TypeError — the server is unreachable, the URL is wrong, or CORS is blocking the request.
- 14
Cumulative Layout Shift
Elements on your page move after initial render because their dimensions are not reserved — images, fonts, or ads load and push content around.
- 15
CSS Specificity War
Your CSS rule is being overridden by a more specific rule, and you cannot figure out why your styles are not applying.
- 16
Responsive Layout Broken
Your page does not adapt correctly to different screen sizes — content overflows, elements are too small, or the layout breaks.
- 17
HTML Form Validation Not Working
Your required, pattern, or type-based validation is not working because the form or inputs are misconfigured.
- 18
DOM Element is Null
Your JavaScript tries to access a DOM element that does not exist, resulting in 'Cannot read properties of null'.
- 19
CSS Not Applying in Print
Your page looks fine on screen but prints incorrectly because screen styles do not apply to print media by default.
- 20
Async Script Execution Order
Your async scripts execute as soon as they download, potentially out of order — if script B depends on script A, B may run before A.
- 21
Flexbox Content Overflow
Your flex items are shrinking too much or overflowing the container because flex defaults cause unexpected sizing behavior.
- 22
Grid Item Not Placing Correctly
Your grid item is in the wrong cell or spanning incorrectly because grid-column or grid-row values are wrong.
- 23
Custom Font Not Loading
Your custom font is not loading because the font file path is wrong, the format is incorrect, or the font-face declaration has errors.
- 24
Iframe Content Blocked
Your iframe is blank because the target site sends X-Frame-Options or CSP headers that prevent embedding.
- 25
CSS Transition Not Animating
Your transition is not working because the property is not transitionable, the duration is missing, or the value change is not triggered.
- 26
localStorage Quota Exceeded
Your localStorage setItem call fails because the storage limit (usually 5-10MB) has been reached.
- 27
SSL Certificate Error
Your HTTPS site shows a security warning because the SSL certificate is invalid, expired, or misconfigured.
- 28
Browser Memory Leak
Your web page gets slower over time because JavaScript is holding references to objects that should be garbage collected.
- 29
SEO Duplicate Content
Your site has the same content accessible via multiple URLs, confusing search engines about which version to index.
- 30
WebSocket Connection Failed
Your WebSocket connection fails to open because the server is not running, the URL is wrong, or the protocol is mismatched.
- 31
Service Worker Registration Failed
Your service worker failed to register — the promise rejected and offline features do not work.
- 32
Geolocation Permission Denied
The user blocked location access — your error callback receives PERMISSION_DENIED and no position is returned.
- 33
Clipboard API Not Available
You called navigator.clipboard.writeText but clipboard is undefined — the page is not in a secure context or the browser lacks support.
- 34
Intersection Observer Invalid Root
You passed a null or detached element as the observer root — intersections are never reported.
- 35
History API State Loss on Reload
You stored data in pushState — after a reload, history.state is null and your app loses the data.
- 36
FileReader readAsText Wrong Encoding
You called readAsText on a non-UTF-8 file without specifying the encoding — the result has garbled characters.
- 37
AbortController Fetch Already Aborted
You aborted the controller before or during fetch — the promise rejects with AbortError and the response is never received.
- 38
HTML Unclosed Tag Breaks Layout
You forgot to close a <div> — the browser closes it where it guesses, often swallowing following siblings into the wrong container.
- 39
CSS Invalid Property Value Ignored
You wrote width: 100 (no unit) or color: purpl — the browser ignores the declaration and uses the default.
- 40
HTML Duplicate ID Attribute
You used id="header" on two elements — getElementById returns the first and styling may apply to the wrong one.
- 41
CSS Missing Closing Brace
You forgot a closing } — the following rule's selector is treated as a property of the broken rule and both are ignored.
- 42
HTML Invalid Attribute Value
You wrote value="say "hi"" — the inner quote closes the attribute early and the rest becomes invalid markup.
- 43
CSS Unknown Vendor Prefix Ignored
You wrote -webkit-flexbox (an old draft name) — modern browsers ignore it and the property never applies.
- 44
CSS Margin Collapse Surprise
You set margin-bottom: 20px and the next element margin-top: 30px — the gap is 30px (not 50px) because margins collapse.
- 45
Event Delegation Target Mismatch
You attached a listener to a parent and checked event.target — but target is the deeply nested child, not the parent you bound to.
- 46
Form Submit Default Not Prevented
You handled submit but forgot e.preventDefault() — the browser performs a full reload and your JS handler's work is lost.
- 47
CSS Percentage Height with No Parent Height
You set height: 100% but the parent has height: auto — the percentage has no reference and the element is only as tall as its content.
- 48
Input value Property vs Attribute Desync
You read getAttribute('value') after the user typed — it returns the initial default, not the current input.
- 49
Scroll Position Unexpectedly Restored
After reload the page jumps to the old scroll position — your SPA intended to start at the top.
- 50
CSS Stacking Context Isolates Z-Index
You set z-index: 9999 on a child but it stays below a modal — a parent created a new stacking context that isolates the child's z-index.
No errors found.