This element establishes a base URL for the website. This allows you to direct every link in the page to a specific site.
<base>
is useful in forcing all page links to be
opened in a new window by setting the target attribute to _blank
.
This element is inserted within the <head>
element.
<base> |
Yes | Yes | Yes | Yes | Yes |
None.
The <base> tag supports the Global Attributes in HTML.
NONE.
NONE.
A demo showing how to use base tag.
<html>
<head>
<base href="http://www.java2s.com/" target="_blank">
</head><!-- www .j av a 2 s . c om-->
<body>
<p>
<a href="index.htm">Click here</a>.
</p>
</body>
</html>