Skip to content

Progressive Enhancement

Progressive enhancement is a design philosophy that emphasizes core HTML functionality first, then layering on CSS for presentation and JavaScript for interactivity. This approach ensures your site works for everyone, regardless of capability or connection speed.

What you’ll learn:

  • Philosophy behind progressive enhancement
  • Three-layer architecture: HTML, CSS, JavaScript
  • Feature detection techniques
  • Graceful degradation vs progressive enhancement
  • Building forms that work without JavaScript
  • Strategies for JavaScript-disabled scenarios
  • CSS feature queries (@supports)
  • Practical progressive enhancement patterns

Prerequisites:

  • Understanding of semantic HTML
  • Basic familiarity with CSS and JavaScript

Progressive enhancement means building websites in layers:

  1. Layer 1: HTML — Core content and functionality
  2. Layer 2: CSS — Visual presentation
  3. Layer 3: JavaScript — Enhanced interactivity

Each layer should be independent. If a layer fails, the site still works.

Benefits:

  • Resilience — Works even if JavaScript fails to load or execute
  • Performance — Users get content immediately, JavaScript enhances later
  • Accessibility — Keyboard navigation and screen readers work by default
  • SEO — Search engines see real content in HTML
  • User experience — Fast initial render, progressive improvement

HTML provides core functionality. Build this layer first.

Result

Notice: Even without CSS or JavaScript, this is fully functional. Users can:

  • Read all content
  • Click links
  • Fill forms
  • Navigate
Result

CSS enhances appearance without affecting functionality.

Styling That Doesn’t Break Functionality

Section titled “Styling That Doesn’t Break Functionality”
Result

Use @supports to apply styles only when browsers support certain features.

Result

JavaScript adds interactivity and improves user experience, but isn’t required for core functionality.

Result

Build forms that work with HTML and CSS alone, then enhance with JavaScript.

Result
Result

Provide alternatives for JavaScript-disabled scenarios.

Result

Check for features before using them.

Result

Graceful Degradation vs Progressive Enhancement

Section titled “Graceful Degradation vs Progressive Enhancement”

Both improve user experience, but with different approaches.

Result
Result

Real-World Progressive Enhancement Examples

Section titled “Real-World Progressive Enhancement Examples”

Example 1: Infinite Scroll with Pagination Fallback

Section titled “Example 1: Infinite Scroll with Pagination Fallback”
Result
Result

When building features:

  • Works without JavaScript — Test with JavaScript disabled
  • Has HTML fallback — Core functionality in semantic HTML
  • CSS enhances but doesn’t break — Styles enhance, not required for function
  • JavaScript improves UX — Faster interactions, better feedback
  • Feature detection — Check for APIs before using them
  • No broken states — Page looks decent at each loading stage
  • Accessible by default — Semantic HTML ensures accessibility
  • Fast initial render — Users see content before JavaScript loads
  • Graceful error handling — Falls back when features unavailable

  • Progressive enhancement builds in layers: HTML → CSS → JavaScript
  • Content first: Use semantic HTML for all core functionality
  • CSS enhances: Styling improves appearance without breaking functionality
  • JavaScript improves: Adds interactivity and better UX
  • Feature detection: Check before using APIs
  • Forms work without JavaScript: Use HTML validation and server-side processing
  • @supports queries: Use newer CSS features safely
  • noscript fallbacks: Provide alternatives for JavaScript-disabled users
  • Test without JavaScript: Use DevTools to disable JS and verify functionality

Back to Accessibility

Make your progressive enhancements accessible to everyone. Continue →

Explore Resources

Check out recommended tools and specifications. Continue →