There are several methods to combine multiple html pages into a website with repeated elements, eg a header or navigation menu.
Repeated elements' code should not be repeated in every html and shouldn't be reloaded every time a new page is loaded.
I'm new to web development and wondering which would be a better practice. I'm not looking for opinions, but rather reasoned arguments from experienced web developers as to what would be a a best practice to tackle this.
My current favourite is the html iframe tag: https://www.w3schools.com/tags/tag_iframe.ASP
client side, using js, in particular jquery like so: https://stackoverflow.com/a/18712605
server side using Php like so: https://stackoverflow.com/a/3809687