Is there a way to embed one HTML file into another HTML file?

Let s say I make a segment of HTML (with or without a header, whatever I need to do to make this work.)

<div>
<p> This is it. </p>
</div>

and I save that as "inserted.html"

could I then have another file "index.html" (the outlying text is irreverent here, only added for aesthetics)

<Doctype HTML><html><body>

<embed src="inserted.html">

</body></html>

or something like this... I am using this to give you a general idea of my purpose. Essentially I want to create a menu on many pages, and connect it to a seperate html code that I can easily change and automatically update all the child pages.

Hope this makes sense. Thank you for your answers.

injanier2016-01-26T10:54:25Z

Favorite Answer

Yes. <iframe src="myfile.html"></iframe>.

Chris2016-01-26T08:21:06Z

Like I told you last time, use PHP.
HTML does not support includes, which is the reason why PHP was invented in the first place.
You will need to install a dev environment; I recommend xampp.