I'm making a web site and due to bureaucratic limitations I am limited to use static web pages.

I would like to include a header and a footer in all of them.

Would it be acceptable to use iframes in this case or should I repeat that code in all of them? Is there any other possibility?

It's not big deal, I simply don't know what is the best practice in this case.

Thank you very much.

PS: I'm also uncertain whether I should ask this in programmers.stackexchange.com it's hard for me to tell the difference.

有帮助吗?

解决方案

What you're looking for is generally referred to as an "include". Server side programming languages like PHP and others offer this functionality. All you have to do is create a header or footer file with the common code on it and then "include" it into each page you want to use it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top