Include Another HTML File Inside A HTML File

For More Videos Visit Our YouTube Channel




Here we consider how to Include Another HTML File Inside A HTML File. Suppose we have two HTML files. HtmlPage1.html, HtmlPage2.html. we wants to include HtmlPage2.html inside HtmlPage1.html.




Inside HtmlPage1.html, there are two div with class FirstDivID and SecondDivID.

The structure of HtmlPage1.html

Include Another HTML File Inside A HTML File, Include A HTML File Inside Another HTML File, Include An HTML File Inside Another HTML File, Include An HTML File In Another HTML File, Include HTML File, Add HTML File In Another HTML File, Append HTML File

We wants to include HtmlPage2.html file inside SecondDivID on HtmlPage1.html.

The structure of HtmlPage2.html






Now on HtmlPage1.html, on Script part, add following code.

Include Another HTML File Inside A HTML File, Include A HTML File Inside Another HTML File, Include An HTML File Inside Another HTML File, Include An HTML File In Another HTML File, Include HTML File, Add HTML File In Another HTML File, Append HTML File

Include Another HTML File Inside A HTML File, Include A HTML File Inside Another HTML File, Include An HTML File Inside Another HTML File, Include An HTML File In Another HTML File, Include HTML File, Add HTML File In Another HTML File, Append HTML File

We have to load HtmlPage2.html inside SecondDivID using Jquery.

That's all, run the application, we can see the result.


Include Another HTML File Inside A HTML File, Include A HTML File Inside Another HTML File,
            Include An HTML File Inside Another HTML File, Include An HTML File In Another HTML File,
            Include HTML File, Add HTML File In Another HTML File, Append HTML File