Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
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.
2 Answers
- injanierLv 75 years agoFavourite answer
Yes. <iframe src="myfile.html"></iframe>.
Source(s): http://www.w3schools.com/tags/tag_iframe.asp - ChrisLv 75 years ago
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.