HTML <base> tag
HTML <base> tag is used to specify a base URI or URL to use for all relative links contained within an HTML document.
Only one <base> element can be specified within a document, and it must be placed within <head> element. We can also specify how other links should open (in the same window, in another window, etc.) using the target attribute.
Syntax
In HTML <base> element does not contain closing tag but in XHTML end tag </base> is required.
Following are some specifications about the <base> tag
Display | None |
Start tag/End tag | Only start-tag |
Usage | Anchors and links |
Example
<html>
<head>
<base href="/D:images" target="_blank">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<img src="1.jpg">
<img src="2.jpg">
<img src="3.jpg">
</body>
</html>
No comments:
Post a Comment