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

  • Revisie-identificator: Web/HTML/HTML_Tags/div
  • Revisietitel: <div>
  • Revisie-id: 1011299
  • Gemaakt:
  • Auteur: Nysmos
  • Is huidige revisie? Ja
  • Reactie

Inhoud van revisie

{{HTMLRef}}

Het HTML <div> element is een algemene container voor flow content, die op zijn eigen niets is.
Het kan gebruikt worden om elementen te groeperen voor stijl-doeleinden (doormiddel van een class of id), of omdat ze attribuut waardes delen, zoals lang. Het mag alleen gebruikt worden als er geen alternatief semantisch element is (zoals {{HTMLElement("article")}} of {{HTMLElement("nav")}}).

Content categories Flow content, palpable content.
Permitted content Flow content.
Tag omission {{no_tag_omission}}
Permitted parent elements Any element that accepts flow content.
DOM interface {{domxref("HTMLDivElement")}}

Attributen

Dit element behoort tot de 'global attributes'.

Het 'align' attribuut is verouderd; Niet meer gebruiken!

Voorbeelden

<div>
  <p>Een willekeurige tekst hier.</p>
</div> 

Resultaat

Een willekeurige tekst hier.

Specificaties

Specificatie Status Commentaar
{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '<div>')}} {{Spec2('HTML WHATWG')}} Geen veranderingen sinds laatste snapshot.
{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '<div>')}} {{Spec2('HTML5 W3C')}} align
{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '<div>')}} {{Spec2('HTML4.01')}}  

Browser compatibiliteit

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basis support 1.0 {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basis support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

Bekijk ook

  • Semantische sectie elementen: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}
  • {{HTMLElement("span")}} element voor het stijlen van content
 

Bron van revisie

<p>{{HTMLRef}}</p>

<p>Het HTML &lt;div&gt; element is een algemene container voor flow content, die op zijn eigen niets is.<br />
 Het kan gebruikt worden om elementen te groeperen voor stijl-doeleinden&nbsp;(doormiddel van een&nbsp;<strong>class</strong> of <strong>id</strong>), of omdat ze attribuut waardes delen, zoals <strong>lang</strong>. Het mag alleen gebruikt worden als er geen alternatief semantisch element is&nbsp;(zoals&nbsp;{{HTMLElement("article")}} of&nbsp;{{HTMLElement("nav")}}).</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>, palpable content.</td>
  </tr>
  <tr>
   <th scope="row">Permitted content</th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>.</td>
  </tr>
  <tr>
   <th scope="row">Tag omission</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">Permitted parent elements</th>
   <td>Any element that accepts <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">flow content</a>.</td>
  </tr>
  <tr>
   <th scope="row">DOM interface</th>
   <td>{{domxref("HTMLDivElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes" name="Attributes">Attributen</h2>

<p>Dit element behoort tot de '<a href="/en-US/docs/Web/HTML/Global_attributes">global attributes</a>'.</p>

<p>Het '<strong>align'</strong> attribuut&nbsp;is verouderd; Niet meer gebruiken!</p>

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

<pre class="brush: html">
&lt;div&gt;
  &lt;p&gt;Een willekeurige tekst hier.&lt;/p&gt;
&lt;/div&gt; 
</pre>

<h3 id="Result" name="Result">Resultaat</h3>

<p>Een willekeurige tekst hier.</p>

<h2 id="Specifications" name="Specifications">Specificaties</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specificatie</th>
   <th scope="col">Status</th>
   <th scope="col">Commentaar</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>Geen veranderingen sinds laatste snapshot.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td><strong>align</strong></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 compatibiliteit</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>Basis 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>Basis 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">Bekijk ook</h2>

<ul>
 <li>Semantische&nbsp;sectie&nbsp;elementen: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}</li>
 <li>{{HTMLElement("span")}} element voor het stijlen van content</li>
</ul>

<div>&nbsp;</div>
Deze revisie terugzetten