Lesson 27 of 55
HTMLProgressive Enhancement – Feature Detection
8 min
Course progress49%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 27 of 55
HTML8 min
Keep these ideas in mind as you work through the lesson.
Progressive Enhancement starts with a baseline experience for the least capable browsers, then adds richer features when supported.
<picture> for responsive images<picture>
<source srcset='hero.webp' type='image/webp' />
<source srcset='hero.jpg' type='image/jpeg' />
<img src='hero.jpg' alt='Hero image' loading='lazy' />
</picture>
Older browsers ignore <picture> and fall back to the <img> tag, ensuring the image still appears.
@supports@supports (display: grid) {
.grid { display: grid; }
}
If the browser doesn’t understand Grid, the rule is ignored and the layout gracefully degrades.
<html>.fetch, Promise).<script type='module'> – Native modules load only in browsers that support them; older browsers fall back to a classic script.@supports for newer features.@supports) in place for newer layout methods? ✅Tip: Test your page in an older browser (e.g., IE 11) or use Chrome’s Network → Disable JavaScript to see the baseline experience.