Including .html in .html? - Programmers Heaven

Howdy, Stranger!

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

Categories

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.