diff options
Diffstat (limited to 'files/de/web/html/element/base/index.html')
| -rw-r--r-- | files/de/web/html/element/base/index.html | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/files/de/web/html/element/base/index.html b/files/de/web/html/element/base/index.html new file mode 100644 index 0000000000..e5f37d7d1a --- /dev/null +++ b/files/de/web/html/element/base/index.html @@ -0,0 +1,170 @@ +--- +title: <base> +slug: Web/HTML/Element/base +tags: + - Element + - HTML + - HTML Dokumentmetadaten + - Referenz + - Web +translation_of: Web/HTML/Element/base +--- +<h2 id="Übersicht">Übersicht</h2> + +<p>Das <em>HTML Base Element</em> (<strong><base></strong>) definiert die Basis URL für alle relativen URLs im Dokument. Das <base> Element darf nur einmal im Dokument vorkommen.</p> + +<div class="note"><strong>Hinweis:</strong> Falls mehrere <code><base></code> Elemente in einem Dokument vorhanden sind, wird nur der Erste <strong>href</strong> und der Erste <strong>target</strong> Wert verwendet. Alle anderen werden ignoriert.</div> + +<table class="properties"> + <tbody> + <tr> + <th scope="row"><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories">Inhaltskategorien</a></th> + <td>Metadata Inhalt.</td> + </tr> + <tr> + <th scope="row">Erlaubter Inhalt</th> + <td>Keine, ist ein {{Glossary("empty element")}}.</td> + </tr> + <tr> + <th scope="row">Tag Auslassung</th> + <td>Es ist kein End-Tag erforderlich.</td> + </tr> + <tr> + <th scope="row">Erlaubte Elternelemente</th> + <td>Jedes {{HTMLElement("head")}} Element, das keine anderen {{HTMLElement("base")}} Elemente enthält.</td> + </tr> + <tr> + <th scope="row">DOM Schnittstelle</th> + <td>{{domxref("HTMLBaseElement")}}</td> + </tr> + </tbody> +</table> + +<h2 id="Attribute">Attribute</h2> + +<p><span style="line-height: 21px;">Dieses Element schliesst </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">globale Attribute</a><span style="line-height: 21px;"> ein</span><span style="line-height: 21px;">.</span></p> + +<dl> + <dt>{{htmlattrdef("href")}}</dt> + <dd>Die Basis URL die im Dokument für relative URLs genutzt werden soll. Wenn dieses Attribut verwendet wird, sollte das Element vor allen anderen Elementen definiert werden, die eine URL als Wert enthalten.<br> + Absolute und relative URLs sind erlaubt (siehe Anmerkungen).</dd> + <dt>{{htmlattrdef("target")}}</dt> +</dl> + +<p>Dieses Attribut legt fest, wo die verlinkte Quelle angezeigt wird. In HTML4 ist das der Name eines Frames oder ein Schlüsselwort für ein Frame. In HTML5 ist es ein Name eines <em>browsing context</em>es oder ein Schlüsselwort für einen <em>browsing context</em> (zum Beispiel ein Tab, Fenster oder Inline Frame). Die folgenden Schlüsselwörter haben eine spezielle Bedeutung:</p> + +<ul> + <li><code>_self</code>: Lädt die Antwort in dasselbe Frame (HTML4) bzw. denselben <em>browsing context</em> (HTML5) wie die aktuelle Seite. Dieser Wert ist der Standardwert.</li> + <li><code>_blank</code>: Lädt die Antwort in ein neues unbenanntes Fenster (HTML4) bzw. einen neuen <em>browsing context</em> (HTML5).</li> + <li><code>_parent</code>: Lädt die Antwort in den <em>frameset parent</em> des aktuellen Frames (HTML4) bzw. <em>parent browsing context</em> (HTML5) des aktuellen. Falls es keinen <em>parent</em> gibt, verhält sich dieser Wert wie <code>_self</code>.</li> + <li><code>_top</code>: Lädt die Antwort in das gesamte Fenster und alle Frames werden überschrieben (HTML4) bzw. in den obersten <em>browsing context</em> (d.h. der <em>browsing context</em>, der dem aktuellen übergeordnet ist und keine übergeordneten <em>browsing context</em>e hat). Falls es keinen übergeordneten gibt, verhält sich dieser Wert wie <code>_self</code>.</li> +</ul> + +<h2 id="Beispiele">Beispiele</h2> + +<pre class="brush: html"><base href="http://www.example.com/"> +<base target="_blank" href="http://www.example.com/"> +</pre> + +<h2 id="Specifications" name="Specifications">Spezifikation</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spezifikation</th> + <th scope="col">Status</th> + <th scope="col">Anmerkung</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'semantics.html#the-base-element', '<base>')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>Keine Änderungen seit der letzten Version</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', 'document-metadata#the-base-element', '<base>')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Verhalten des <code>target</code> Attributs defniert</td> + </tr> + <tr> + <td>{{SpecName('HTML4.01', 'struct/links.html#h-12.4', '<base>')}}</td> + <td>{{Spec2('HTML4.01')}}</td> + <td><code>target</code> Attribut hinzugefügt</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoDesktop("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatGeckoMobile("1.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="Anmerkungen">Anmerkungen</h2> + +<ul> + <li>Die Basis URL ist für Skripte erforderlich, die {{domxref('document.baseURI')}} verwenden.</li> + <li>Relative URLs für <code>href</code> werden seit Gecko 2.0 (Firefox 4.0) unterstützt</li> + <li>HTML 2.0 und 3.2 spezifizieren lediglich das <code>href</code> Attribut</li> + <li>XHTML setzte einen nachfolgenden Slash voraus: <code><base /></code></li> + <li>Die Verwendung eines Verweises innerhalb der Seite, z.B. <code><a href="#anchor">Anker</a>,</code> wird mit Hilfe der Basis-Url ausgewertet und löst einen HTTP-Request auf die Basis-Url aus.<br> + <br> + <strong>Beispiel:</strong><br> + <br> + Die Basis Url:<br> + <code><base href="http://www.example.com/"></code><br> + <br> + Der Verweis:<br> + <code><a href="#anchor">Anker</a></code><br> + <br> + Wird aufgelöst in:<br> + <code>http://www.example.com/#anchor</code><br> + </li> +</ul> + +<p>{{HTMLRef}}</p> |
