Prasanth A R Prasanth A R - 11 months ago 60
CSS Question

Make header and footer files to be included in multiple html pages

I want to create common header and footer pages that are included on several html pages.

I'd like to use javascript. Is there a way to do this using only html and JavaScript?

I want to load a header and footer page within another html page.


You could do it with jquery. Put this code in index.html

<script src="//"></script>
<div id="header"></div>
<!--Remaining section-->
<div id="footer"></div>

And put this code in header.html and footer.html at the same location as the index.html

<a href="">click here for google</a>

Then visit the index.html, you should be able to click the link tags.