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.

Example Code:
    <base href="">
    <base target="_blank">

    <img src="arrow.gif">
    <a href="">CSSPortal</a>
Attribute Definition

Specifies a base URL for all relative URLs on a page.


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

  • _blank
  • _parent
  • _self
  • _top
Global Attributes:

The <base> tag also supports the Global Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.