Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking (embedding) html page

Status
Not open for further replies.

Nordyck

Programmer
Aug 16, 2001
57
US
I'm tring to get 1 html page to read another by using <link href=&quot;&quot;>.

The two pages are:
1: Contains the logo's, header and menu bar
2: Contains the body and footer info.

Because the information in the 1st html page doesn't change from page to page, I wanted to create a single page and link that page into other web page.

I was able to do this using asp but I'm not able to do it on html page. Also the server I'm on doesn't support asp.
 
You can use a server-side include:
<!--- include virtual=&quot;common_elements_page.shtml&quot;--->
in which case all the page names would need to end in 'shtml' instead of 'html'.

Or you could use Cascading Style Sheets.

Server side includes are easier but the common page elements (menu bar, top logo, etc) will re-load every time you change pages. Look at (a site I maintain) to see this how this approach works. The left side menu is one file that gets included at the server when every page is invoked.

CSS can eliminate this performance issue if you do it right... only the content would change. Click the &quot;St. Raymond School&quot; link from to see how this works. The school section of the site was done using CSS. Note that although the upper left picture changes randomly. the rest of the top-left header bars do not re-load when you click around the school site.

A site with good tutorials on both approaches is:



Mike Krausnick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top