For this you need to add server side language if you are using PHP you can create a
nav.php file. In this file you can add the complete HTML of your navigation and you can
include this PHP file in your code instead of putting navigation HTML.
Like this