Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<base>

<base
href=url
target=name>
</base>

The page's URL. The browser uses this to work out the full address of any relative URLs (for example in links or references to pictures) that appear in the page. For example:

<base href="http://www.sample.com">

When you use the href attribute with this tag, whatever you place between its quotes will be added in front of any links you write. You make a link as follows:

<A href="page.html">

If you use the <base> tag to set a url, the link now becomes:

http://www.sample.com/page.html

Watch it though because the jump might not work on a local hard drive because you always get the domain name in the link. You might use this if you move a page to a different location but do not move the pictures and related pages. In this case, set the base URL to the directory where the pictures and related pages are.

Use only in the <head> section of the page.

Attributes

href=url

The page's full URL in case the page gets read out of context and the reader wants to refer to the original.

target=name

You can associate a name with browser windows and frames that links can refer to. When you click on the link, the browser displays the destination page in the named window or frame. Only supported by browsers that can handle frames.

The target can be one of the following:

Value…

Description…

name

Loads the link into the window or frame with this name. The name must begin with an alphanumeric character

_blank

Load page into a new blank window

_parent

Load the page into the immediate parent of the page

_self

Load the page into the current window

_top

Load the page into the full body of the window