Call funtions that reside in a different file

I would like to know if it is possible to create a template in any language, HTML, CSS, jQuery, JavaScript, etc.

where I could create a template for my site with a header (with an image), sidebar (for instance a selector, images, and somethingelse), footer(with links to other pages like about page, contact us, etc), and I central area where I introduce a different code an info to each HTML page.

My idea is so I can modify only in one place the image of the header, the selector or the sidebar or any other element so it will change in all the HTML pages instead of having to have to change it in every single HTML page.

IF it is possible, how could I do it with the following selector?

Code:

<select id=“mySelect” onchange=“if(this.options[this.selectedIndex].value != ‘’){window.top.location.href=this.options[this.selectedIndex].value}”>
<option>Select an option</option>
<option value=“http://www.google.com”>Orange</option>
<option value=“http://www.google.com”>Pineapple</option>
<option value=“http://www.google.com”>Banana</option>
</select>Thanks so much

CSS is used to provide a consistent presentation across multiple pages, and a server-side language such as PHP is used to provide consistent content.

That’s standard with things like a CMS, but also easy to do with very simple PHP. It’s better to do this sort of thing with a server-side lingo like PHP. JS can easily be turned off in a browser, meaning that if someone with JS off visits your site, the layout would be totally borked.