I am working on a project for my course and since it has several pages, I would like the header and footer to be independent, because if I have to change something it is a hassle to change it on all the pages. I have seen several solutions out there but they all use php. Is there a way to do it without php? It is that the course is front-end (HTML, CSS and JavaScript) and we have not given php. Thanks.
You will need to create separate html files for both the
header
and thefooter
.Once you have them created, you can include them on any page as follows:
With JQuery :
With JavaScript :