I've created a seperate html files for navigation, content and footer. I want to club those files. All the navigation, content, footer files resides in the same directory where the index.html file resides. I want to include the above mentioned html files inside the index.html. I have tried using the following in index.html file
<!-- #include virtual="topbanner.html" -->

I also tried using the asp code which also fails. I tried with asp by changing all the html file extensions as .asp. Then i tried to place the following asp code in index.asp file as
<!-- #include file="topbanner.asp" -->


Kindly solve my problem. This is an urgent thing to do for me.

M.Sworna Vidhya

Yes you can use SSI(server-side includes) if your hosting provider supports them. Read about them here.

Frames are not recommended as they are not always supported by every browser.
Coldfusion, ASP.net, and PHP all have include functions as well.

Frames are not recommended as they are not always supported by every browser.

Biggest drawback with Frames : Search engine spiders don't like them.

ASP and PHP both allow includes. SSI is dependent on the server settings (some hosts allow them and some don't. If your host allows them, generally the file extension on the page with the includes will be .shtml.

You don't need a full html page to be included - you only need what would be inside the body as the include will inherit the properties of the including page.

As Voyager97 mentioned - Search engines don't do frames at all well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.