3 Years
Discussion Span
Last Post by webhawk

I would use php for this job as iframes are out dated.

what you will need to do is add the header and footer code to each page once you have done that if you edit header or footer php will auto update all 20 pages

just place this code at the top of each page

<?php include("header.html"); ?>

and place this code at bottom of every page

<?php include("footer.html"); ?>

that should do the job nicely for you :)


If you don't have access to server side scripting (PHP, asp.net, etc..) then do you know if you can use javascript? If so you can load jQuery and easily add HTML elements from a single source.


for html5, you can probably use object like this..

<object name="header" type="text/html" data="head.html"></object>
<br />

<object name="footer" type="text/html" data="footer.html"></object>


I am not sure though, but you can refer to the documentation here.

I am not really sure if we can use two objects ..

Update: yes we can use two. I updated the codes above.

Edited by veedeoo: more info added


Veedeoo has given a nice workaround that basically does the same thing as javascript includes. Good for when you can use javascript.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.