When creating a webpage, we often include the nav on all pages:
<nav id="nav">
<ul>
<li><a href="about.html" class="active">About us</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
We'll often only mark the active page by using an active class:
<li><a href="contact.html" class="active">Contact</a></li>
Copying-and-pasting the whole navigation into all subpages is not a good idea - if we decide to add one new page, we have to change the nav on all subpages.
Can we put the navigation into a separate file and then import it?
<!-- PSEUDOCODE --> <import file="nav.html" active="About us" />
Or maybe there is a HTML-compliant preprocessor for this (I want to reuse my existing code, not rewrite it from scratch)