HTML5 Doctor

HTML5 Doctor es un sitio web en el que se explica HTML y las novedades de HTML5.

Lo más interesante de este sitio web es que no se limita únicamente a los aspectos técnicos, es decir, a lo que podemos encontrar en cualquier referencia sobre el lenguaje, sino que explica cómo usar las etiquetas en diferentes situaciones.

Por ejemplo, ¿cuál es la diferencia entre <article> y <section>? En este sitio web nos dan su opinión:

There’s been a lot of confusion over the difference (or perceived lack of a difference) between the <article> and <section> elements inHTML5. The <article> element is a specialised kind of <section>; it has a more specific semantic meaning than <section> in that it isan independent, self-contained block of related content. Wecould use <section>, but using <article> gives more semantic meaning to the content.

By contrast <section> is only a block of related content, and <div> is only a block of content. Also as mentioned above the pubdate attribute doesn’t apply to <section>. To decide which of these three elements is appropriate, choose the first suitable option:

  1. Would the content would make sense on its own in a feed reader? If so use <article>
  2. Is the content related? If so use <section>
  3. Finally if there’s no semantic relationship use <div>

Dr Bruce has written HTML5 <article>s and <section>s, what’s the difference?, so we recommend reading that if you are still fuzzy on when to use <article>.

Profesor del Departamento de Lenguajes y Sistemas Informáticos de la Universidad de Alicante (España). Interesado en el desarrollo y la accesibilidad web.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.