How to include an HTML file within an another HTML file
Acessing HTML files
Collapse
X
-
Tags: None
-
Hi,
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! -
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
RonaldComment
-
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.Comment
-
Comment