Base URL
Base specifies the base pathname for all relative URLs in the body of the web page. A base specification bears the form
<base href="http://www.explainth.at/en/html" />
Note that it is necessary to specify the full path here - starting with http/s as appropriate. The terminating solidus, /, is only needed for XHTML. One can optionally specify a target="name" attribute to cause the link to be opened in a named window. The name can either be that for a named HTML frame or one of the following intrinsic target names
- _blank:A new blank window.
- _self:The current window - which could be a frame in a frameset.
- _parent:The parent of the current window. This is useful when using an HTML document that uses frames - via a frameset - with one of the, named, frames having been used as the target previously. Once we decide that it is time to abandon the frameset we specify
target="_parent". - _top:The _parent specification allows us to drop back one level which too could have been a frame in a frameset. The
target="_top"specification, on the other hand, allows us to discard all frames and show the target document in the full body of the current browser tab - all modern browsers that matter now support tabs.
Although we have talked of frames and framesets on this page we hasten to add that frames are wholly incompatible with good webpage design. Therefore, there is no further discussion of frames on this site. All the effects delivered by a frame can be accomplished by using positioned div elements.
By specifying a default target in the base path declaration and overriding it as required by specifying the target attribute in individual anchor tags one can create more compact web pages which are easier to maintain.
Some of the more obscure browsers and many "download accelerators" have difficulty correctly interpreting complex paths specified relative to a base URL. Consequently you will find some spurious "file not found" errors in your log files. While this could be easily corrected using a few SSI directives to deliver a different version of the document if the browser is not one of IE, Firefox, Opera or Safari, our experience suggests that the extra effort and complexity are rarely warranted.