Link to home
Start Free TrialLog in
Avatar of pigeon5566
pigeon5566

asked on

Regarding Including HTML page

Hi,

I have a  homepage.html which has a header and navigation menu.   In navigation menu i have menu items which has hyperlinks  to other html pages (page1.html, page2.html, page3.html) .In page1.html and page2.html i want to include the contents of homepage.html because it has header's description and menu description .  How do i include the contents of homepage.html in page1.html, page2.html and page3.html?

ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pigeon5566
pigeon5566

ASKER

Thanks for the info..    So your saying in HTML there is no tag to include the contents of other HTML Page.  So i need to use jsp for doing this?  
Correct.  JSP, ASP, PHP...they can all do what you're looking for.
PS: There IS a tag to include content.
It is called iframe
I did not consider an iframe for this question because of the nature of the include.  I suppose it would work (no reason it shouldn't), but I would not use an iframe for the header/menu of a page...I'd use an include file.
If we take the comment


"So your saying in HTML there is no tag to include the contents of other HTML Page."

The answer could be iframe :)
You are correct...I misspoke because a) I was focused on the context of the request, and b) I don't generally consider iframe to be a solution.  (my own personal bias against frames and their kin)

The <iframe> tag would be able to do the requested work.  Future readers can see more information about that concept here:

http://www.w3schools.com/tags/tag_iframe.asp

I recommend against using them as a general rule, and would still stand by my response here given the context of the request.
Sure - I completely agree. If you have access to server side processing, iframes should be avoided.
That said, I am considering using them myself on my own site to be able to control bulk download - e.g. if you are not human, you do not get the iframe with the content
Apologies for the delay