HTML <base> Tag

Description:

The <base> tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point.

 

Specific Attributes:

Attribute Definition
href Specifies a base URL for all relative URLs on a page.

Other Attributes:

Attribute Definition
target

Specifies the target frame to load the page into.
Possible Values:

  • _blank
  • _parent
  • _self
  • _top

Example Code:

<head>
<base href="http://www.htmlportal.net/images/" />
<base target="_blank" />
</head>

<body>
<img src="arrow.gif" />
<a href="http://www.htmlportal.net">HTMLPortal</a>
</body>