Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

Specifies the default URL and default target for all links on the page:

<

head

<

base

href

=

"

http://www.runoob.com/images/

"

target

=

"

_blank

"

head

<

body

<

img

src

=

"

logo.png

"

width

=

"

24

"

height

=

"

39

"

alt

=

"

Stickman

"

<

a

href

=

"

http://www.runoob.com

"

runoob.com

a

body

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support tag.


Tag Definition and Usage Notes

The tag specifies a default URL or default target for all relative links on the page.

In a document, at most one can be used . The tag must be located inside the element.


Tips and Notes

**Tip:** Please place the tag inside the elementfirstso that other elements in the head section can use the information in the element.

**Note:** If the tag is used, it must have either an href attribute, a target attribute, or both.


Differences between HTML 4.01 and HTML5

none.


Differences between HTML and XHTML

In HTML, the tag has no end tag.

In XHTML, The tag must be closed properly.


property

property Value Description
href URL Specifies the base URL for all relative links on the page.
target _blank
 _parent       

 _self       

 _top       

 *framename* | Specifies where all hyperlinks and forms on the page open. This attribute will be overridden by the target attribute in each link. |


Global Attributes

The tag supports [HTML Global Attributes](ref-standardattributes.html).

Event attribute

The tag does not support any event attributes.

Related Articles

HTML DOM Reference Manual: Base Object