Latest web development tutorials

HTML <base> tag

Examples

A predetermined default page URL and the default target for all links:

<Head> <Base href = "http://www.w3big.com/images/" target = "_blank"> </ Head> <Body> <Img src = "logo.png" width = "24" height = "39" alt = "Stickman"> <A href = "http://www.w3big.com"> w3big.com < / a> </ Body>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support <base> tag.


Tag definitions and instructions

<Base> tag on the page relative to all the provisions of the default link URL or the default target.

In one document, it can be used up to a <base> element. <Base> tag must be in the <head> element inside.


Tips and Notes

Tip: The <base> tag in the row position <head> element ofthe firstelement, so head region other elements you can use the <base> element in the information.

NOTE: If you use the <base> tag, you must have the href attribute or target property or two properties are available.


Differences between HTML 4.01 and HTML5

no.


Differences between HTML and XHTML

In HTML, <base> tag has no end tag.

In XHTML, <base> tag must be closed properly.


Attributes

Attributes value description
href URL URL for all relative links reference the provisions of the page.
target _blank
_parent
_self
_top
framename
Provision of hyperlinks to all pages and forms where the open. This property will be covered each link of the target property.


Global Properties

<base> tag supports HTML global properties .


Event Properties

<Base> tag does not support any event attributes.


related articles

HTML DOM Reference: Base Object