slug: Web/HTML/Element/section
translation_of: Web/HTML/Element/section
---
Sommario
L'elemento HTML section (<section>) rappresenta una sezione generica di un documento, ovvero un gruppo tematico di contenuti, tipicamente provvisto di un'intestazione. Ogni <section> dovrebbe essere identificabile, solitamente utlizzando un'intestazione ({{HTMLElement('h1')}}-{{HTMLElement('h6')}}) come fliglio dell'elemento <section>
Note d'uso :
- Se ha senso aggregare il contenuto di un elemento {{HTMLElement("section")}}, è preferibile usare un elemento {{HTMLElement("article")}} al suo posto.
- Si sconsiglia di usare l'elemento {{HTMLElement("section")}} come contenitore generico; a questo scopo è preferibile usare {{HTMLElement("div")}}, soprattutto quando la suddivisione in sezioni viene solamente effettuata a scopo stilistico. La regola generale è che una sezione debba apparire logicamente nell'indice di un documento.
Attributi
Questo elemento include solo gli attributi globali.
Esempi
<section>
<h1>Intestazione</h1>
<p>Contenuto</p>
</section>
Esempio 2
Prima
<div>
<h2>Intestazione</h2>
<img>Un'immagine</img>
</div>
Dopo
<section>
<h2>Intestazione</h2>
<img>Un'immagine</img>
</section>
Specifiche
| Specifica |
Stato |
Commenti |
| {{SpecName('HTML WHATWG', 'sections.html#the-section-element', '<section>')}} |
{{Spec2('HTML WHATWG')}} |
|
| {{SpecName('HTML5 W3C', 'sections.html#the-section-element', '<section>')}} |
{{Spec2('HTML5 W3C')}} |
|
Compatibilità con i browser
{{CompatibilityTable}}
| Funzionalità |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
| Supporto di base |
5 |
{{CompatGeckoDesktop("2.0")}} |
9.0 |
11.10 |
4.1 |
| Funzionalità |
Android |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
| Supporto di base |
2.2 |
{{CompatGeckoMobile("2.0")}} |
9.0 |
11.0 |
5.0 (iOS 4.2) |
Vedi anche
- Altri elementi correlati alle sezioni: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}};
- Sezioni e indici nei documenti HTML5.
{{HTMLRef}}