Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Including .html in .html?

Hello all,

Is there any way to include other HTML files in a HTML file?

I know you can more or less do that with style sheets,

but is there a way to do it for HTML?

(Like the #include directive in C/C++)

TIA

Thomas Kay


Comments

  • If you mean how to make html codes show up on a web page, then here is the solution.


    The &amplt is the less than sign.

    The &ampgt is the greater than sign.




  • : Hello all,

    : Is there any way to include other HTML files in a HTML file?

    : I know you can more or less do that with style sheets,

    : but is there a way to do it for HTML?

    : (Like the #include directive in C/C++)

    : TIA

    : Thomas Kay


    html is a lot different than c or c++, thomas. there are no functions, if you want something to happen a few times in different spots on the page, you just gotta rewrite the code.




  • : Hello all,

    : Is there any way to include other HTML files in a HTML file?

    : I know you can more or less do that with style sheets,

    : but is there a way to do it for HTML?

    : (Like the #include directive in C/C++)

    : TIA

    : Thomas Kay


    Not with HTML, but it's possible with CGI (if your ISP/host would give you CGI execution privileges). You could use C, C++, Perl, or whatever your ISP/host allows you to use to display the main page and then insert the other HTML file, text file, etc. or just parts of it. This is useful, say, to parse another page that contains frequently updated info (like stock prices) and insert it neatly into your own page.


  • : Hello all,

    : Is there any way to include other HTML files in a HTML file?

    : I know you can more or less do that with style sheets,

    : but is there a way to do it for HTML?

    : (Like the #include directive in C/C++)

    : TIA

    : Thomas Kay




    If you thinking of showing HTML code on your page,

    try XMP tag, example. Tags are ignored until it closes, so be careful! If you are talking about files, check if you have "Server Side Includes". If you do, search for a tutor. You can "include" files almost exactly like C.




Sign In or Register to comment.