|
|
HTML <base> tag
Syntax
<base> - </base>
Definition and Usage
The BASE element defines the document's base
URI for
all the links and references within the document. A document cannot contain more
than one BASE element. When present, the BASE
element must appear in the HEAD,
prior to any elements that include a partial URI.
Required Attributes
| Attribute |
Value |
Description |
| href |
URL |
Specifies the URL to use as the base URI for links and
references in the page |
Optional Attributes
| Attribute |
Value |
Description |
| target |
_blank
_parent
_self
_top |
Where to open all the links on the page. This attribute
can be overridden by using the target attribute in each link.
- _blank - all the links will be opened in new windows
- _self - all the links will be opened in the same frame they where
clicked
- _parent - all the links will be opened in the parent frameset
- _top - all the links will be opened in the full body of the window
|
Example
| Source |
Output |
| <img src="http://www.htmlforall.com/images/dog.gif">
can be replace by:
<head>
<base href="http://www.htmlforall.com/images/" >
</head>
<img src="dog.gif" >
|
 |
|
|