HTML | PHP | Forum

HTML <base> tag


<base> - </base>

Definition and Usage

The BASE element defines the document's base URI for all the links and references within the document. A document cannot contain more than one BASE element. When present, the BASE element must appear in the HEAD, prior to any elements that include a partial URI.

Required Attributes

Attribute Value Description
href URL Specifies the URL to use as the base URI for links and references in the page

Optional Attributes

Attribute Value Description
target _blank
Where to open all the links on the page. This attribute can be overridden by using the target attribute in each link.
  • _blank - all the links will be opened in new windows
  • _self - all the links will be opened in the same frame they where clicked
  • _parent - all the links will be opened in the parent frameset
  • _top - all the links will be opened in the full body of the window


Source Output
<img src="">

can be replace by:

<base href="" >

<img src="dog.gif" >



Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

<h1> to <h6>


Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us