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 643475 of <div>

  • Adressname der Version: Web/HTML/Element/div
  • Titel der Version: <div>
  • ID der Version: 643475
  • Erstellt:
  • Autor: kklein
  • Aktuelle Version? Nein
  • Kommentar fixed tag

Inhalt der Version

Ü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.

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}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{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
{{HTMLRef}}

Quelltext der Version

<h2 id="Summary" name="Summary">Übersicht</h2>
<p>Das&nbsp;<strong><a href="/en-US/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>
<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Inhaltskategorien</a></dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Fließender Inhalt</a>, greifbarer Inhalt.</li>
 <li><dfn>Erlaubter Inhalt</dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Fließender Inhalt</a>.</li>
 <li><dfn>Tag Auslassung</dfn> {{no_tag_omission}}</li>
 <li><dfn>Erlaubte Elternelemente</dfn> Jedes Element, dass&nbsp;<a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">fließenden Inhalt</a>&nbsp;erlaubt.</li>
 <li><dfn>DOM Schnittstelle</dfn> {{domxref("HTMLDivElement")}}</li>
</ul>
<h2 id="Attributes" name="Attributes">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="Result" name="Result">Ergebnis</h3>
<p>Jede Art von Inhalt ist erlaubt, wie zum Beispiel &lt;p&gt; oder &lt;table&gt;.</p>
<h2 id="Specifications" name="Specifications">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_compatibility" name="Browser_compatibility">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 (WebKit)</th>
   </tr>
   <tr>
    <td>Basic support</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>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Phone</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also" name="See_also">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>
<div>
 {{HTMLRef}}</div>
Zu dieser Version zurücksetzen