XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / base
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
HTML 4.01 | HTML 5 |
base
HTML: <base>; XHTML: <base/> or <base />
Defines the base path for all relative URLs in the document. The element base must be placed in the head (<head>) of the document.
Start/end tag
This is an empty element. HTML forbids an end tag. In XHTML, the element must end with a slash before the closing angle bracket. Developers can insert a space before the slash to improve backward compatibility with older browsers.
Attributes
href="URI"Required in HTML 4.01. Specifies the absolute URL to use as the base URL for resolving relative links in the document.
id="Text"XHTML and HTML 5 only. Assigns an ID that uniquely identifies the element.
target="Name"Defines the target window for all links in the document.
Example (HTML)
<head>
<title>Beispieldokument</title>
<base href="http://www.example.com/stories/">
</head>Example (XHTML)
<head>
<title>Beispieldokument</title>
<base href="http://www.example.com/stories/" />
</head>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de