A no-JavaScript fallback

The page still works without scripts.

HTML · A no-JavaScript fallbackAdvanced
<form action="/search" method="get" id="search-form">
  <input type="search" name="q" aria-label="Search">
  <button type="submit">Search</button>
</form>

<noscript>
  <p>Live search needs JavaScript. You can still use the button above.</p>
</noscript>
<script>
  document.documentElement.classList.add('js');
</script>
noscriptprogressive enhancementfallback