Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


<BASE>

The <BASE> Tag is used to tell your HTML where it's "home base" is, and should be between the <HEAD> Tags. For example, if you have many links to the same host or directory other than the host or directory your page is currently, you'll save time by using a <BASE> Tag. It is used with the HREF command also.

For this example, assume that the current URL is http://www.quadzilla.com/fwilinks.htm

htmlcode.gif (606 bytes)

		
<head>
<title>D.J. Quad's Ultimate HTML Site - FWI Links</title>
<base href="http://www.fwi.com">
</head>
[...]
<a href="link1.htm">Link 1</a>
<a href="link2.htm">Link 2</a>

Even though you are at http://www.quadzilla.com/fwilinks.htm your HTML assumes that any link specified in the <BASE> Tag would use the link relative to http://www.fwi.com. If you were to click on Link 1, it would go to http://www.fwi.com/link1.htm even though you are currently at http://www.quadzilla.com/fwilinks.htm and only specified link1.htm for your link.

hr1.gif (724 bytes)

It can also be used with targeted frames, for the same result, but this time it's used with the TARGET command.

htmlcode.gif (606 bytes)

		
<head>
<title>D.J. Quad's Ultimate HTML Site - FWI Links</title>
<base target="_top">
</head>
[...]
<a href="link1.htm">Link 1</a>
<a href="link2.htm">Link 2</a>

This example says that all the links in your HTML would load in a new window target, or "_top" which would break out of your frameset.



Up to => Home / Quadzilla / Tag_Ref




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers