<article>
L'element HTML <article>
representa una composició autònoma en un document, pàgina, aplicació o lloc, que està destinada a ser distribuir de forma independent o reutilitzables (per exemple, en la sindicació). Això podria ser un missatge del fòrum, un article d'una revista o un diari, una entrada de blog, un objecte, o qualsevol altre element independent del contingut. Cada <article>
ha de ser identificat, generalment mitjançant la inclusió d'una capçalera (element <h1>-<h6>
) com un fill de l'element <article>.
Notes d'us:
- Quan es nia un element
<article>
, l'element interior representa un article relacionat amb l'element exterior. Per exemple, els comentaris d'un blog poden ser elements<article>
niats en <article> representen a l'entrada del bloc. - La informació sobre l'autor d'un element
<article>
pot ser proporcionada a través de l'element<address>
, però no s'aplica a elements niats<article>
. - La data de publicació i el temps d'un element
<article>
es poden descriure mitjançant l'atributdatetime
d'un element<time>
. Recordeu que el atributpubdate
de<time>
ja no és una part de l'estàndard HTML 5 del W3C.
Categories de contingut | Contingut de Flux, contingut de seccionament , contingut palpable. |
---|---|
Contingut permès | Contingut de Flux. |
Omissió de l'etiqueta | Cap, tant l'etiqueta inicial com l’etiqueta final són obligatòries |
Elements pares permesos | Qualsevol element que accepti contingut de flux. Recordeu que un element <article> no ha de ser un descendent d'un element <address> . |
Interfície DOM | HTMLElement |
Atributs
Aquest element només inclou els atributs globals.
Exemples
<article class="film_review">
<header>
<h2>Jurassic Park</h2>
</header>
<section class="main_review">
<p>Dinos were great!</p>
</section>
<section class="user_reviews">
<article class="user_review">
<p>Way too scary for me.</p>
<footer>
<p>
Posted on <time datetime="2015-05-16 19:00">May 16</time> by Lisa.
</p>
</footer>
</article>
<article class="user_review">
<p>I agree, dinos are my favorite.</p>
<footer>
<p>
Posted on <time datetime="2015-05-17 19:00">May 17</time> by Tom.
</p>
</footer>
</article>
</section>
<footer>
<p>
Posted on <time datetime="2015-05-15 19:00">May 15</time> by Staff.
</p>
</footer>
</article>
Especificacions
Especificació | Estat | Comentari |
---|---|---|
HTML Living Standard The definition of '<article>' in that specification. |
Living Standard | |
HTML 5.1 The definition of '<article>' in that specification. |
Recommendation | |
HTML5 The definition of '<article>' in that specification. |
Recommendation |
Navegadors compatibles
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Característica |
Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | 5 | 4.0 (2.0) | 9.0 | 11.10 | 4.1 |
Característica |
Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Suport bàsic | 2.2 | 4.0 (2.0) | 9.0 | 11.0 | 4.2 |