Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST TOOLS

JS Tutorial

JS Syntax

JS Operators

JS If Conditions

JS Loops

JS Strings

JS Numbers

JS Functions

JS Objects

JS Scope

JS Dates

JS Temporal  New

JS Arrays

JS Sets

JS Maps

JS Iterations

JS Math

JS RegExp

JS Data Types

JS Errors

JS Debugging

JS Style Guide

JS Reference

JS Projects  New

JS Versions

JS HTML DOM

JS HTML Events

JS HTML First

JS Advanced

JS Functions

JS Objects

JS Classes

JS Asynchronous

JS Modules

JS Meta & Proxy

JS Typed Arrays

JS DOM Navigation

JS Windows

JS Web API

JS AJAX

JS JSON

JS jQuery

JS Graphics

JS Examples

JS Reference


Progressive Enhancement

Progressive enhancement is a web development strategy where the basic version of a website works first.

Extra features are added later for browsers that support them.

This approach helps websites stay accessible, reliable, and fast.

Start With HTML

The first step is to create a meaningful HTML content.

The page should still work if CSS or JavaScript fails to load.

Example

<h1>Newsletter Signup</h1>

<form action="/signup" method="post">
  <label for="email">Email:</label>
  <input type="email" id="email" name="email" required>
  <button type="submit">Join</button>
</form>
Try it Yourself »

The form above works without JavaScript.


Add CSS for Better Design

After the HTML works, CSS can improve the appearance of the page.

Example

<style>
button {
  background-color:#04AA6D;
  color:white;
  padding:10px;
  border:none;
}
</style>
Try it Yourself »

Add JavaScript as an Enhancement

JavaScript can improve the user experience, but the page should not depend completely on it.

For example, JavaScript can add instant validation or animations.

Example

<script>
const form = document.querySelector("form");

form.addEventListener("submit", function() {
  alert("Form submitted!");
});
</script>
Try it Yourself »

The form still works even if this script does not load.


Why Progressive Enhancement Matters

Users browse the web with different devices, browsers, and internet speeds.

Some users may disable JavaScript completely.

Others may use older browsers or assistive technologies.

Progressive enhancement helps ensure that everybody can still access the content.

Tip: Try testing your website with JavaScript disabled.


Graceful Degradation vs Progressive Enhancement

Graceful degradation starts with a complex website and tries to make it work on older browsers.

Progressive enhancement starts simple and adds features step by step.

Progressive Enhancement Graceful Degradation
Starts simple Starts advanced
Adds features later Removes unsupported features
Focuses on accessibility Focuses on compatibility

Modern HTML Helps

Modern browsers support many features that once required JavaScript.

Examples include:

  • required form validation
  • <details> expandable content
  • loading="lazy" image loading
  • CSS animations and transitions

This makes progressive enhancement easier than ever.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

-->