Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1023832 of <div>

  • Adressname der Version: Web/HTML/Element/div
  • Titel der Version: <div>
  • ID der Version: 1023832
  • Erstellt:
  • Autor: Sebastianz
  • Aktuelle Version? Ja
  • Kommentar .htmlelt Liste ersetzt durch .properties Tabelle (Bug 1214591)

Inhalt der Version

{{HTMLRef}}

Übersicht

Das HTML <div> Element (oder HTML Document Division Element) ist ein generischer Container für fließenden Inhalt, der im Grunde genommen Nichts repräsentiert. Dieser kann für die Gruppierung von Elementen genutzt werden, um sie zu stylen (mit Hilfe des class oder id Attributs) oder weil sie die gleichen Attribut-Werte besitzen, wie zum Beispiel das Attribut lang. Dies sollte nur genutzt werden, wenn kein anderes semantisches Element (wie {{HTMLElement("article")}} oder {{HTMLElement("nav")}}) geeignet ist.

Inhaltskategorien Fließender Inhalt, greifbarer Inhalt.
Erlaubter Inhalt Fließender Inhalt.
Tag Auslassung {{no_tag_omission}}
Erlaubte Elternelemente Jedes Element, dass fließenden Inhalt erlaubt.
DOM Schnittstelle {{domxref("HTMLDivElement")}}

Attribute

Dieses Element schließt globale Attribute ein.

In {{HTMLVersionInline(5)}} ist das align Attribut bezogen auf <div> Elemente obsolet {{obsolete_inline}}.

Beispiele

<div>
  <p>Jede Art von Inhalt ist erlaubt, wie zum Beispiel &lt;p&gt; oder &lt;table&gt;.</p>
</div> 

Ergebnis

Jede Art von Inhalt ist erlaubt, wie zum Beispiel <p> oder <table>.

Spezifikationen

Spezifikation Status Kommentar
{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '<div>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '<div>')}} {{Spec2('HTML5 W3C')}}  
{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '<div>')}} {{Spec2('HTML4.01')}}  

Browser Kompatibilität

{{CompatibilityTable}}

Merkmal Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Grundlegende Unterstützung 1.0 {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Merkmal Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Grundlegende Unterstützung {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

Siehe auch

  • Semantische Sektionselemente: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}
  • {{HTMLElement("span")}} Element für die Darstellung von Formulierungsinhalten

Quelltext der Version

<div>{{HTMLRef}}</div>

<h2 id="Übersicht">Übersicht</h2>

<p>Das <strong><a href="/de/docs/Web/HTML">HTML</a> <code>&lt;div&gt;</code> Element</strong> (oder <em>HTML Document Division Element</em>) ist ein generischer Container für fließenden Inhalt, der im Grunde genommen Nichts repräsentiert. Dieser kann für die Gruppierung von Elementen genutzt werden, um sie zu stylen (mit Hilfe des&nbsp;<strong>class</strong> oder <strong>id</strong> Attributs) oder weil sie die gleichen Attribut-Werte besitzen, wie zum Beispiel das Attribut&nbsp;<strong>lang</strong>. Dies sollte nur genutzt werden, wenn kein anderes semantisches Element (wie {{HTMLElement("article")}} oder {{HTMLElement("nav")}}) geeignet ist.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Inhaltskategorien</a></th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Fließender Inhalt</a>, greifbarer Inhalt.</td>
  </tr>
  <tr>
   <th scope="row">Erlaubter Inhalt</th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Fließender Inhalt</a>.</td>
  </tr>
  <tr>
   <th scope="row">Tag Auslassung</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">Erlaubte Elternelemente</th>
   <td>Jedes Element, dass&nbsp;<a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">fließenden Inhalt</a>&nbsp;erlaubt.</td>
  </tr>
  <tr>
   <th scope="row">DOM Schnittstelle</th>
   <td>{{domxref("HTMLDivElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attribute">Attribute</h2>

<p>Dieses Element schließt&nbsp;<a href="/en-US/docs/Web/HTML/Global_attributes">globale Attribute</a>&nbsp;ein.</p>

<p>In {{HTMLVersionInline(5)}} ist das&nbsp;<strong>align</strong> Attribut bezogen auf&nbsp;<code>&lt;div&gt;</code> Elemente obsolet {{obsolete_inline}}.</p>

<h2 id="Examples" name="Examples">Beispiele</h2>

<pre class="brush: html">
&lt;div&gt;
  &lt;p&gt;Jede Art von Inhalt ist erlaubt, wie zum Beispiel &amp;lt;p&amp;gt; oder &amp;lt;table&amp;gt;.&lt;/p&gt;
&lt;/div&gt; 
</pre>

<h3 id="Ergebnis">Ergebnis</h3>

<p>Jede Art von Inhalt ist erlaubt, wie zum Beispiel &lt;p&gt; oder &lt;table&gt;.</p>

<h2 id="Spezifikationen">Spezifikationen</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Spezifikation</th>
   <th scope="col">Status</th>
   <th scope="col">Kommentar</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td>&nbsp;</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>Merkmal</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Grundlegende Unterstützung</td>
   <td>1.0</td>
   <td>{{CompatVersionUnknown}}</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>Merkmal</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Grundlegende Unterstützung</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="Siehe_auch">Siehe auch</h2>

<ul>
 <li>Semantische Sektionselemente: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}</li>
 <li>{{HTMLElement("span")}} Element für die Darstellung von Formulierungsinhalten</li>
</ul>
Zu dieser Version zurücksetzen