The HTML5 base Tag

The HTML5 <base> tag is particularly the target or the base URL for all the relative URLs in an HTML document. The HTML5 <base> tag is important because it sets the main URL being used as a reference for the document. When the HTML5 <base> tag is used, it defines the base address where the elements in the document will be taken from.

The HTML5 <base> tag has to be utilized as the first element in the HTML5 <head> element. It is essential that the HTML5 <base> tag element be used only once.

The functionality of HTML5 <base> tag is the same whether in HTML4.01 or HTML5.

This is an example of how the HTML5 <base> tag is used:

<base href="" target="_blank" />

The HTML <base> tag is used for one or more attributes. These attributes are added to provide the browser more information on how the tag should appear/behave. These attributes consist of a name and a value separated by an equals (=) sign, with the value surrounded by double quotes.

The attributes that can be used for the HTML5 <base> tag are the following:






Identifies base for relative URLs in the page



Identifies target for all links

Featured pages


Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …


Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…


 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …