<base> tag in HTML

The <base> tag is used to specify a base URI, or URL, for relative links.

Important Description

  • The <base> is an empty tag, means it has no end tag in HTML. BUT in XHTML it must be properly closed.
  • If the <base> tag is present, it must have either an href attribute or a target attribute, or both.

Syntax Example of <base> tag

<base> Tag Browser Support

Element Chrome Edge Firefox Safari Opera
<base> Yes Yes Yes Yes Yes

Global Attributes

  • The <base> tag supports all the Global Attributes in HTML.
  • The <base> tag does not supports any event attributes.

Attributes

Attribute Value Description
href URL Specifies the URL of a page or the name of the anchor that the link goes to.
target _blank
_parent
_self
_top
Specifies the default target for all hyperlinks and forms in the page

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)