Back to main page!

Knowledgebase Home Knowledgebase Home
Search the Knowledgebase Browse by Category
How do I include one HTML file in another?
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful
Use "server side includes" in your HTML. Not all web servers support this, and some require that you name your file .shtml rather than .html in order to enable the parsing of your file by the server in order to find server side include directives.

Of course, server side includes only work when a web server is being used to access your pages. This is only an issue when testing your pages on your local hard drive. If this becomes a problem, it may be time to install a web server on your own computer, for local testing purposes.

A simple server side include directive to include another file looks like this:

< !-- #i nclude file= " insertthisfile.html " -->

There are many more server side include directives available; for example, you can easily insert the current date into your page. For more information, see the Apache server side includes tutorial, which also covers how to configure the free Apache web server correctly with support for server side include directives.

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.

Home | Web Design | Print Advertisements | Banner Design | Other Services


Copyright © 2003 Digital Arts Group @ FrankGonzalez.com. All Rights Reserved
About Us | Disclaimer | Privacy Policy | Terms of Use | Design Team | Sitemap