By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

Acessing HTML files

P: 17
How to include an HTML file within an another HTML file
Feb 15 '08 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 490
Not with html, HTML is purely a clientside presentation language.
HOWEVER you can do it using XML, and Javascript, or a serverside language (PHP or ASP).

it is relativly straight forward with the above. make a choice and then ask in the relative forum. Cheers mate!
Feb 15 '08 #2

Expert 2.5K+
P: 4,258
Don't agree entirely with that.

You can use the so-called SSI (Server Side Includes) from within HTML but only if the server supports SSI, which a lot of servers do. With SSI you can not only include files but a lot of other things also.

Best is to use google and have a look at the zillion entries. An introductory overview can be found HERE

Feb 15 '08 #3

P: 11
SSI, or Server Side Includes, were first developed to allow Web developers to "include" HTML documents inside other pages. If your Web server supports SSI, it's easy to create templates for your Web site.

1. Save the HTML for the common elements of your site as separate files. For example, your navigation section might be saved as navigation.html or navigation.ssi.
2. Use the following SSI tag to include that HTML in each page.

<!--#include virtual="path to file/include-file.html" -->

3. Use that same code on every page that you want to include the file.
Feb 15 '08 #4

P: 17
Thank u.. ya i have done by using ASP.. but i need it in HTML itself
Mar 11 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.