The Base element allows the URL of the document itself to be set, to help browsers in situations where the document may be read out of context. It is especially useful in allowing browsers to determine any partial URL's, or relative paths that may be specified (for example, in <A HREF>
elements, or paths pointing to <IMG SRC=...>
(images). The <BASE>
Element should appear within the bounds of the <HEAD>
element.
Where the base address is not specified, the HTML user agent uses the URL it used to access the document to resolve any relative URLs.
The Base element uses the HREF attribute, which identifies the URL, which should be a fully qualified URL
<BASE HREF="http://www.myhost.com/">
specifies www.myhost.com to be the base from which all relative URLs should be determined.
The Netscape Navigator (from version 2.0) and Internet Explorer (from version 3.0) adds one other attribute to the BASE
element. With the introduction of targeted windows the TARGET attribute as used in anchors (<A>
) can be used.
This allows the author to pick a default named target window for every link in a document that does not have an explicit TARGET
attribute. Its format is:
<BASE TARGET="default_target">
CLASS="Style Sheet class name"
The CLASS
attribute is used to specify the <BASE>
as using a particular style sheet class. See the Style Sheets topic for more information.
ID="Unique element identifier"
The ID
attribute can be used to either reference a unique style sheet identifier, or to provide a unique name for the <BASE>
element for scripting purposes. Any <BASE>
element with an ID
attribute can be directly manipulated in script by referencing its ID
attribute, rather than working through the All collection to determine the element. See the Scripting introduction topic for more information.
LANG="language setting"
The LANG
attribute can be used to specify what language the <BASE>
element is using. It accepts any valid ISO standard language abbreviation (for example "en"
for English, "de"
for German etc.) For more details, see the Document Localisation section for more details.
TITLE="informational ToolTip"
The Internet Explorer 4.0 (and above) specific TITLE
attribute is used for informational purposes. As the <BASE>
element doesn't directly affect the display of a document, no ToolTip is presented when using the TITLE
attribute (as with other elements).
Consistent with Internet Explorer 4.0's Dynamic HTML object model, the <BASE>
element supports various properties and methods. In its role as a document structure element, it supports no events.
<BASE...>
Properties
Of the Standard Dynamic HTML properties, <BASE>
supports className, document, id, isTextEdit, lang, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, tagName and title. See the Standard Dynamic HTML properties topic for details.
Also, the <BASE>
element supports the href and target properties, which directly reflect any settings of their respective attributes (see above).
<BASE...>
Methods
Of the Standard Dynamic HTML methods, <BASE>
supports contains, getAttribute, removeAttribute and setAttribute. See the Standard Dynamic HTML methods topic for details.
© 1995-1998, Stephen Le Hunte
file: /Techref/language/html/ib/Document_Structure_Elements/base.htm, 6KB, , updated: 2004/3/1 15:47, local time: 2024/11/14 14:40,
18.224.54.148:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/techref/language/html/ib/Document_Structure_Elements/base.htm"> <BASE></A> |
Did you find what you needed? |