How to include an HTML file in another HTML file. Is there an easy way to do this?
thanks
I think you are looking for the back end: http://en.wikipedia.org/wiki/Server_Side_Includes . To summarize (and simplify), change the extension of your page from .html to .shtml, then you will need to use an include statement similar to:
<!--#include virtual="somefile.html" -->
You may be looking for information about iframe s ( live example ).
iframe
<html> <body> <iframe src ="/default.asp" width="100%" height="300"> <p>Your browser does not support iframes.</p> </iframe> </body> </html>
Do you serve HTML files from a web server such as IIS or Apache? Both sides of the support include:
<!--#include virtual="nameOfFileToInclude.html" -->
A page in the WWW FAQ section.
Well, if you have any server-side scripting language, all of this will do the job perfectly. Another option is html-frames (in your case, most likely iframe), or ajax (asynchrounus javascript request).
My preferred method uses PHP if it is installed on your server. If so, the easiest way to do this is to simply paste this code in the right place in the file containing the file: <?php include('filename.php') ?>
<?php include('filename.php') ?>
Note that both files must have a .php extension.
.php
You can use the server side (i.e. Apache SSI doc ).
Frames would be the only other way that I can think of that would not require the use of a programming language on the server or client side.
Source: https://habr.com/ru/post/1302403/More articles:Output python scripts displayed only on completion when using SSH? - pythonVersion of Excel document in VSTO add-in - versioningPlay embedded YouTube videos on one page - javascriptbash script in ssh in field and get me into python shell - unixWhat is the use of member functions in C ++? - c ++How to set checked property of CheckBoxList elements in aspx markup? - asp.netJava and Axis cameras - javaWhat is the best module to access SimpleDB in python? - pythonIs there a way to determine code coverage without running code? - static-analysisIs there a general JavaScript library? - javascriptAll Articles