HTML 5 <base> Tag
Example
Specify a default URL and a default target for all links on a page:
<head>
<base href="http://www.w3schools.com/css/" target="_blank" />
</head>
<body>
<a href="default.asp">W3Schools' CSS Tutorial</a>
</body> |
Try it yourself » |
Definition and Usage
The <base> tag specifies a default URL, and/or a default target, for all
elements with a URL (hyperlinks, images, forms, etc.).
The <base> tag must go inside the head element.
Differences Between HTML 4.01 and HTML 5
None
Tips and Notes
Tip: Put the <base> tag as the first element in the head
element, so that other elements in the head section uses the information from
the <base> element.
Note: Maximum one <base> element in a
document.
Attributes
| Attribute |
Value |
Description |
| href |
URL |
Specifies the URL to use as the base URL for links in the page |
| 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 open in new windows
- _self - all the links will open in the same frame they where clicked
- _parent - all the links will open in the parent frameset
- _top - all the links will open in the full body of the window
|
Standard Attributes and Events
NONE

Whether you're new to XML or already an advanced user,
the user-friendly views and powerful entry helpers,
wizards, and debuggers in XMLSpy are designed to meet your XML
and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- And much more!
Download a free trial today!
|
|
|
|