Results 1 to 5 of 5

Thread: How do I include one file inside another in HTML?

  1. #1
    Join Date
    Jul 2010
    Posts
    36

    How do I include one file inside another in HTML?

    I have recently started working with the HTML coding, so you can consider me as noobie. I have just heard that HTML itself offers no way to seamlessly incorporate the content of one file into another. Now I am looking for some help so that I can include one file inside another in HTML. Please tell me how do I include one file inside another in HTML? I hope that somebody will help me soon.

  2. #2
    Join Date
    Dec 2008
    Posts
    183

    Re: How do I include one file inside another in HTML?

    True active addition of one HTML document (even in a different "charset") into another is offered by the OBJECT element, but due to shortcomings of browser versions in current use, it seems imprudent to rely on this yet for essential content. The same can be said for IFRAME. Two accepted ways of including the contents of one file impeccably into another for the WWW are preprocessing and server-side inclusion. A preprocessor converts its source into a plain HTML document that you distribute on your server. In disparity, documents that use server-side inclusion are processed every time the document is retrieved from the server.

  3. #3
    Join Date
    Dec 2008
    Posts
    202

    Re: How do I include one file inside another in HTML?

    Preprocessing modus operandi include the C preprocessor and other generic text manipulation methods, and numerous HTML-specific processors. Be cautious of making your "source code" non-portable. Also, the HTML can only be validated after preprocessing, so the typical cycle "Edit, Check, Upload" becomes "Edit, pre-process, Check, Upload" (here, "Check" includes whatever steps you utilize to preview your pages: validation, linting, management walk-through, etc., and "upload" means whatever you do to finally publish your new pages to the web server).

  4. #4
    Join Date
    Dec 2008
    Posts
    161

    Re: How do I include one file inside another in HTML?

    A much more influential and resourceful preprocessing procedure is to use of SGML processor (such as the SP package) to produce your HTML, this can be self-validating. Examples of server-side inclusion are Server Side Includes (SSI, supported by Apache , NCSA , and other web servers), and Microsoft's Active Server Pages (ASP, supported by MS IIS). Processing transpires at the time the documents are essentially retrieved. A typical inclusion looks like
    <!--#include virtual="/urlpath/to/myfile.htm" -->

  5. #5
    Join Date
    Jan 2006
    Posts
    211

    Re: How do I include one file inside another in HTML?

    Using server-side insertion (a potentially authoritative tool) simply as a way to interleave static files such as standard header / footers has implications for perceived speed and for server access Load, and is better avoided on heavily loaded servers. If you use it in this way, consider making the result cacheable. Proper HTML validation of server-side inclusion is only probable after server-side processing is done (eg by using on-line validators that repossess the document from the server). Lastly, note that if the included file contains capricious plain text, then some provision must be made to convert the characters "&" and "<" (in the plain text file) to the entities "&" and "<" ( in the HTML document).

Similar Threads

  1. How to include .SWF files to the html webpage
    By LynDa55 in forum Technology & Internet
    Replies: 3
    Last Post: 15-01-2011, 07:02 PM
  2. How to include the video file in Html
    By Owen Fernandes in forum Software Development
    Replies: 5
    Last Post: 29-12-2009, 11:40 AM
  3. How to include comments in HTML
    By rooki in forum Software Development
    Replies: 5
    Last Post: 25-12-2009, 01:06 PM
  4. How to include Header & footer within HTML?
    By seema_thk in forum Software Development
    Replies: 3
    Last Post: 09-12-2009, 09:24 AM
  5. Include a html file by removing head / body
    By KALYAN23 in forum Software Development
    Replies: 3
    Last Post: 09-10-2009, 04:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,950,113.04087 seconds with 17 queries