Problem Statement
Explain the concept of progressive enhancement with an example.
Explanation
Progressive enhancement builds a basic functional experience first, ensuring accessibility for all users and browsers. Then, advanced features like animations, JavaScript, or APIs are layered on for modern browsers. For example, a form should work with basic HTML submission first, then be enhanced with AJAX for smoother performance.
Code Solution
SolutionRead Only
<!-- Basic form --> <form action="/submit" method="POST"> <input type="text" name="name"> <button>Submit</button> </form> <!-- Enhanced with JavaScript --> <script> // AJAX form enhancement </script>
Practice Sets
This question appears in the following practice sets:
