If you are building a simple website using just simple HTML/CSS/Javascript that has say 5 pages, is it possible to build a template so that the headers and navigation can be called in each page?
If you are building a simple website using just simple HTML/CSS/Javascript that has say
Share
While you could use JavaScript to generate content, this is a bad idea (for all the usual reasons that having JavaScript that isn’t unobtrusive isn’t a good idea).
You should use either a proper template system or an include system.
I would suggest looking at the ttree utility that is part of Template-Toolkit. It generates static files, so you don’t need any particular server side support to use it.