I have a website with a header that I want to be the same on all pages. Every time I change one thing, I have to go and update it on all other pages, which is time-consuming and annoying. Is there any way that I could replace this repetitive code with something simple?
My code:
<header>
<img src="logo.png"></img>
<nav>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</nav>
</header>
Is there any way that I could replace this code across multiple pages by having something like this
<header>
<div class="header"></div>
</header>
And have it be replaced with all the code above (by storing it in HTML/CSS). Any way that allows me to change one thing and have it change on every page is what I'm looking for.