Engineering 4 min read Updated
Progressive enhancement in practice: HTML first
In short
Build the page so the main task works with HTML alone, then add CSS and JavaScript as improvements that never block the baseline.
One failed script should not blank the whole page. Progressive enhancement therefore works the other way round: build a page that works for as many people as possible, then add layers for browsers that can do more. MDN describes it as a design philosophy. Give essential content and functionality to as many users as possible, and the best experience only to users of modern browsers that can run all the required code.
Start with HTML that already works
The GOV.UK Service Manual asks teams to make a page work with HTML first, and to add CSS and JavaScript afterwards. Its guidance on resilient frontends also says that users should be able to move through a service using only HTML, and that government services should work with HTML alone. Its examples are transactional services, such as forms that collect information from users.
The reason is practical. Some people switch off browser features on purpose, and others use old or slow devices. The guidance wants those users to be able to use the service too.
How each layer fails
The same guidance describes three layers by how a browser responds to their errors. The table sums it up:
| Layer | How the browser responds to errors | What it means for your page |
|---|---|---|
| HTML | Fault-tolerant by design: markup it does not understand is ignored and parsing continues. | Clean, meaningful markup keeps the content usable even when part of the page fails. |
| CSS | Reasonably fault-tolerant: unsupported declarations are ignored one at a time. | One unsupported rule should not hide the content. |
| JavaScript | Not fault-tolerant: an unsupported call raises an error, and the rest of the script does not run. | Keep essential actions working without it, so that one failed call does not block the task. |
The last row explains why the task itself must not depend on script. A link or a form submission can still work when a script never starts.
Working on something similar in your own product? A few honest sentences are enough – we read every enquiry and reply by email. Apply with your idea
Baseline first, enhancement on top
MDN describes the approach as layered. The baseline gives users of older browsers, or of devices with limited capabilities, a simpler experience that is still usable. The enhancement then extends that experience for users with newer browsers and richer devices. Feature detection checks whether a browser can handle a modern feature, and polyfills add missing features with JavaScript.
Accessibility deserves special attention, and acceptable alternatives should be available wherever possible. Graceful degradation is related to this approach, although it is often seen as the opposite direction. Both approaches are valid and can complement each other. For a short definition, see the MDN entry on progressive enhancement.
Forms and validation
Forms are where the principle pays off most. A form that submits with plain HTML can be completed by every visitor, including those without script. Checks in the browser can then make the experience faster, but they should not be the only checks, because the server has to validate what it receives. For how a form should guide people through errors, see Forms people actually finish.
The statements about GOV.UK and MDN summarise their public guidance. The advice on server-side validation is general engineering practice, not a finding from those sources.
Checklist before release
Test each main page with JavaScript turned off, then check these points:
- Name the main task, and complete it with the HTML alone in a browser with script disabled.
- Check that every link leads to a real page, and that every form submits to a real endpoint.
- Keep error messages in the HTML, rather than adding them only with script.
- Check that the content stays readable if the stylesheet fails to load.
- Confirm that each script adds to a page that already works, and that nothing essential is reachable only through it.
- Test the page on older or lower-powered devices too, because regular manual testing is part of the guidance. Check how search engines see the page, as described in What Google can see on a JavaScript page.
- Remove third-party scripts that the baseline does not need, as discussed in the article on the real cost of third-party scripts.
Common questions
- What is the baseline in progressive enhancement?
- It is the essential content and functionality that reach as many users as possible. MDN describes it as simpler but still usable, and enhancements are added on top for browsers that can handle them.
- Why does JavaScript need special care?
- The GOV.UK guidance says the JavaScript layer is not fault-tolerant, so an unsupported call stops the rest of the script from running. Essential actions should therefore not depend on it.
- Does progressive enhancement mean avoiding JavaScript?
- No. JavaScript can add value on top of a working page. The point is that the page still works when the script does not run, for instance when a user has turned it off on purpose.
Sources
- Building a robust frontend using progressive enhancement, Government Digital Service (GOV.UK Service Manual). Accessed 24 November 2026
- Progressive enhancement, MDN Web Docs (Mozilla). Accessed 24 November 2026
Further reading
-
Loading scripts with defer, async and modules
Use defer for scripts that need the page and must keep their order, async for independent scripts, and type module for modern code, which is deferred by default.
-
What Google can see on a JavaScript page
Google can render JavaScript, but server-side or pre-rendered HTML with crawlable links is still the safer default for content that must be found.
-
The real cost of third-party scripts
A third-party script costs your visitors time even when it is small, so load it with care and remove what adds no clear value.
Have an idea that should exist? Or a working product that needs more customers, a new website or a complete rework? Bring us anything. Apply with your idea