logo Learn HTML
  • Home
  • Tutorials
  • Practice
  • Quiz
  • Projects
  • About
  • Contact

HTML Course

  • HTML HOME
  • HTML Introduction
  • HTML Basic
  • HTML Element
  • HTML Attributes
  • HTML Headings
  • HTML Paragrapha
  • HTML Style
  • HTML Formattin
  • HTML Quotations
  • HTML Colors
  • HTML Css
  • HTML Links
  • HTML Image
  • HTML Favicon
  • Page Tittle
  • HTML Tables
  • HTML Lists
  • Block & Inline
  • HTML Div
  • HTML Classes
  • HTML Id
  • HTML Buttons
  • HTML Iframes
  • HTML File Paths
  • HTML Head
  • HTML Layout
  • HTML Symbols
  • HTML Emojis
  • HTML URL Encode
  • HTML VS XHTML
  • HTML FROM
  • HTML Form
  • Form Attributes
  • Form Elements
  • HTML Input Types
  • HTML Input Attributes
  • Input Form Attributes
  • HTML Graphics
  • HTML Canvas
  • HTML SVG
  • HTML Media
  • HTML Media
  • HTML Video
  • HTML Audio
  • HTML Plug-ins
  • HTML Youtube
  • HTML APIS
  • HTML Web APIS
  • HTML Geolocation
  • HTML Drag & Drop
  • Web Storage
  • Web Workers
  • HTML SSE
  • HTML Examples
  • HTML Examples
  • HTML Editor
  • HTML Quiz
  • HTML Exercises
  • HTML References
  • HTML Tag List
  • HTML Attributes
  • HTML Global Attributes
  • HTML Brower Support
  • HTML Events
  • HTML Colors
  • HTML Canvas
  • HTML Audio & Video
  • HTML Doctypes
  • HTML Character Sets
  • HTML URL Encode
  • Language Codes
  • HTTP Messages
  • HTTP Methods
  • PX to EM Converter
  • keyboard Shortcuts

Understanding HTTP Status Codes

At LearnHTML, we categorize these codes into five groups based on their first digit. This makes it much easier to diagnose what is happening between the client (your browser) and the server.


1xx: Informational

These codes mean the request was received and the process is continuing.

  • 100 Continue: The server is ready for the rest of the request.
  • 101 Switching Protocols: The server is changing protocols (e.g., to WebSockets).

2xx: Success

The best kind of codes! These mean the action was successfully received and accepted.

  • 200 OK: The standard response for a successful request.
  • 201 Created: A new resource (like a user account) was successfully made.
  • 204 No Content: The request worked, but there is no data to send back.


3xx: Redirection

The requested resource has moved. The browser usually follows these automatically.

  • 301 Moved Permanently: The page is gone forever; the browser should use the new URL.
  • 304 Not Modified: The browser can use its "cached" (saved) version of the page.
  • 308 Permanent Redirect: Similar to 301, but specifically for modern web standards.

4xx: Client Errors

These mean something went wrong on the user's side.

  • 400 Bad Request: The server didn't understand the request (often a syntax error).
  • 401 Unauthorized: You need to log in to see this page.
  • 403 Forbidden: The server understands the request but refuses to give access.
  • 404 Not Found: The most famous error. The page does not exist.
  • 408 Request Timeout: The browser took too long to send the request.

5xx: Server Errors

These mean the server failed to fulfill a valid request.

  • 500 Internal Server Error: A generic "oops" message when the server crashes.
  • 502 Bad Gateway: One server got an invalid response from another server.
  • 503 Service Unavailable: The server is overloaded or down for maintenance
  • 504 Gateway Timeout: The server waited too long for a response from another server.

Why should you care as a Developer?

  1. SEO: If your site has too many 404 errors, Google will rank you lower.

  2. Debugging: If you see a 500 error, you know you need to check your server-side code (PHP, Python, etc.), not your HTML.

  3. User Experience: You can create custom "Error Pages" for 404 errors to help users find their way back to your homepage.

Try It Your Self

Sign Up For New
Update

HTML Basic
  1. HTML Basic
  2. HTML Element
  3. HTML Attributes
  4. HTML Headings
  5. HTML Paragrapha
  6. HTML Tables
  7. HTML Lists
HTML Advance
  1. HTML Div
  2. HTML Classes
  3. HTML Id
  4. HTML Buttons
  5. HTML Iframes
  6. HTML Symbols
  7. HTML Emojis