|
The example of base tag in HTML
<html>
<head>
<base href="http://www.easywayserver/html/" />
<title>Base tag example</title>
</head>
<body>
<a href="openURL.html">base tag in HTML</a>
</body>
</html>
Working example of base tag
base tag in HTML
The HTML base tag is used to define default URL of all relative links and relative URL in webpage. Base tag is defined inside the head tag of HTML.
Base tag is useful when absolute URL is not defined in webpage. Relative path automatically consider as base path as initial path of relative path and base path plus relative path create full URL path for target destination.
Base tag can use target attribute for opening window options.
In href attribute URL of base tag can be defined.
Base tag is supported by all major web browsers. These web browsers can be Internet Explorer, Firefox, netscape, google chrome.
Base tag attribute
| Attribute |
Value |
Explaination |
| href |
URL |
URL path for linked web page |
| target |
_blank
_parent
_self
_top |
Linked page open in window |
|