xdl xdl - 1 year ago 99
HTML Question

How to apply same content to multiple html pages

I'm new to html and was wondering if there is a way to apply the same content to many html files at once.

For example, if I have many pages, but all those pages have an identical navigation side panel that contains links to all the other pages. Is there any way to change the contents of this side panel without changing it for each individual page?
i.e. is there a feature that allows me to make this navigation panel in a separate file, then tell all my pages to include this navigation file?

I know a css file can control the format of many html pages - is there an analogy to this that can control the content of many html pages?

Answer Source

You can use PHP to do that. Write the HTML code in PHP file, then add include statement in your HTML. This saves you from having to write same code again and again specially for navigation, etc.

PHP manual explains it.

Hope it helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download