You are here : htmlHTML 5base

<base> - HTML 5

The <base> tag specifies the base URL/target for all relative URLs in a document.

There can be at maximum one <base> element in a document, and it must be inside the <head> element.

Attributes :

  • href (URL) - Specifies the base URL for all relative URLs in the page.
  • target (_blank, _parent, _self, _top,framename) - Specifies the default target for all hyperlinks and forms in the page.


Syntax

<base href="https://wikidev.in/" target="_blank">


Example

<head>	
	<base href="http://wikidev.in/images/" target="_blank">	
</head>
<body>
	<img src="html.png" width="24" height="39" alt="html5">
	<a href="https://wikidev.in">Wikidev</a>
</body>


Output / Return Value


Limitations


Alternatives / See Also


Reference