Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









TAG:  base

<base>
Available in versions: 2.0, 3.2, 4.0
Browser compatibility: Explorer 4, 5  Netscape 4, 6
 
The <base> tag is used to define the base URL for the HTML document. This allows the use of relative URL addresses elsewhere in the document. Interestingly, this base URL does not have to be an absolute URL, but rather, it can be a relative URL.
 
Also, when a browser arrives from another site to your site via a link, you can use the target attribute of this tag to ensure that your site does not appear inside a frame or window of the previous site. In other words, your site will always appear as the top window.
 
The base tag must be placed between the opening and closing head tags.
 
There is no closing tag.
 
Core Attributes
 
none
 
Attributes
 
href
The href attribute is mandatory. It is used to define the base URL.
 
target
The target attribute specifies the default name of the frame or window in which all of the target pages should appear when a link is clicked on your site. However, this can be overridden by a target attribute that is inside an a tag. The four reserved names are _blank, _parent, _self, and _top.
 
In this example, the link in the body resolves to:
http://www.devguru.com/Technologies/HTML/quikref/html_index.html
 
Code:
<head>
<base href="http://www.devguru.com/">
</head>
<body>
<a href="../Technologies/HTML/quikref/html_index.html">HTML Index</a>

 
This code directs that your site always appears as the top window.
 
Code:
<head>
<base target="_top">
</head>


 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information