English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<base>-Tag legt für alle relativen URLs in einem Dokument eine Grund-URL fest /Ein Dokument kann maximal einen <base>-Element enthalten, und dieses muss im <head>-Element stehen.
Legen Sie eine Standard-URL und ein Standardziel für alle Links auf der Seite fest:
<!DOCTYPE html> <html> <head> <title>HTML:<base> href Eigenschaft - Grundtutorialsite oldtoolbag.com</title> <base href="https://de.oldtoolbag.com/" target="_blank"> </head> <body> <p>Bitte beachten Sie, dass wir nur relative Adressen für Bilder angegeben haben. Da wir im Header die Grund-URL spezifiziert haben, wird der Browser "https://de.oldtoolbag.com/static/images/colormap.gif”处查找图像</p> <img src="static/images/colormap.gif" width="234" height="199" alt="colormap"> <a href="tags/Tag-base.html">HTML base Tag</a> </body> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the href attribute.
The <base> tag specifies the base URL for all relative URLs in the document /Target.
A document can contain at most one <base> element, and this element must be within the <head> element.
Note: If the <base> tag exists, it must have a href attribute or a target attribute, or both.
None.
In HTML, the <base> tag does not have a closing tag.
In XHTML, the <base> tag must be closed correctly.
None. The <base> tag does not support any event attributes.
<base href="URL">
Value | Description |
---|---|
URL | as an absolute URL for the base URL (e.g. "https://de.oldtoolbag.com/)。 |