Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML base definition

Browser support
IEFFOpSaf
FullFullFullFull

Type: head element

Syntax

XHTML:
<base />
HTML:
<base>

Description

The base element is used to define the URL to use as base URL for all links etc. on a page. The base element is contained  in the head of a document.

Value

Attribute Value Description
href URL Defines the URL to use as base URL for links in the document.
target

_blank
_parent
_self
_top
framename

_blank - all links in the document will open in new windows.
_self - all links will open in the same frame.
_parent - all links will open in the parent frameset.
_top - all links will open in the full browser window.
framename - The links will open in the frame with this name.

Example

Assume that we have an image at 'http://www.glubase.com/images/image.gif'. With the following code we can display the image anywhere in the document using '<img src="image.gif" \>'.

<head>
<base href="http://www.glubase.com/images/" \>
</head>

  • Comments

No comments added.