HTML base tag
HTML <base> tag specifies the alternate or default URL (address) for all the hyperlinks present in a page. This default URL is written in the href attribute of the <base> element.
<head>
<base href="https://www.web4college.com" target="_blank">
</head>
<body>
<a href="">Go to web4college</a>
</body>
</>
Tag omission
The base is self-closing element (</base>) i.e. there is no end tag.
Global Attributes
All global attributes are applicable on the base element.
If there are more than one base elements then all the base elements are ignored except the first one.
If there are more than elements with different target attributes then all are ignored except first one.
Next Previous
Was this article helpful?