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
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
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:
CLASS="Style Sheet class name"
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"
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 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.
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.
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.
<BASE> element supports the href and target properties, which directly reflect any settings of their respective attributes (see above).
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 16:47, local time: 2018/3/18 14:37,
|©2018 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://www.piclist.com/techref/language/html/ib/Document_Structure_Elements/base.htm"> <BASE></A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180318 RussellMc, Isaac M. Bavaresco, Sean Breheny, Neil, Van Horn, David, David C Brown, alan.b.pearce, Bob Blick, John Gardner, Brent Brown,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!