The title might have been a bit confusing, sorry about that. Let me clarify.
So in my website, I have a <nav>
section which is present on every .html page for the site. If I want to make a change to the nav menu, I have to change it on every single page.
Is there a way that I can have that <nav>
section in its own .html file (e.g. nav.html) and then have it produced on every site .html page? That way, if I need to make a change then it only needs to be made in a single file (i.e. nav.html) and will still update on all pages when it's run.
If I can do that somehow, how can I make it so that it will scroll to the top of the page if the nav button of the current page is pressed?
So if I'm on photos.html and I click the "Photos" link on the nav bar (which would usually take me to photos.html), can I make it not refresh the page but instead just go to top, for example? (i.e. <a href="#">Photos</a>
)