--- title:
slug: Web/HTML/Element/figura tags: - Element - Image - Information - Presentation - Reference translation_of: Web/HTML/Element/figure ---
{{HTMLRef}}

L'elemento HTML <figure> rappresenta un contenuto indipendente che può avere una descrizione tramite l'elemento ({{HTMLElement("figcaption")}}). L'immagine, la descrizione e il suo contenuto hanno riferimenti indipendenti.

{{EmbedInteractiveExample("pages/tabbed/figure.html","tabbed-shorter")}}
Categorie di contenuti Contenuti di flusso, sezioni e struttura
Contenuti permessi L'elemento {{HTMLElement("figcaption")}}, seguito da contenuti di flusso; o contenuti di flusso seguiti dall'elemento {{HTMLElement("figcaption")}}; o contenuti di flusso.
Omissione del tag {{no_tag_omission}}
Genitori permessi

Qualsiasi elemento che accetti Contenuti di flusso.

Ruoli ARIA permessi {{ARIARole("group")}}, {{ARIARole("presentation")}}
Interfaccia DOM {{domxref("HTMLElement")}}

Attributi

Questo elemento include gli attributi globali.

Note sull'utilizzo

Esempi

Immagini

<!-- Solo un'immagine -->
<figure>
  <img
  src="https://developer.mozilla.org/static/img/favicon144.png"
  alt="Il bellissimo logo MDN.">
</figure>

<!-- Un'immagine con descrizione -->
<figure>
  <img
  src="https://developer.mozilla.org/static/img/favicon144.png"
  alt="Il bellissimo logo MDN.">
  <figcaption>MDN Logo</figcaption>
</figure>
{{EmbedLiveSample("Immagini", "100%", 375)}}

Frammenti di codice

<figure>
  <figcaption>Ottieni dettagli sul browser utilizzando <code>navigator</code>.</figcaption>
  <pre>
function NavigatorExample() {
  var txt;
  txt = "Browser CodeName: " + navigator.appCodeName + "; ";
  txt+= "Browser Name: " + navigator.appName + "; ";
  txt+= "Browser Version: " + navigator.appVersion  + "; ";
  txt+= "Cookies Enabled: " + navigator.cookieEnabled  + "; ";
  txt+= "Platform: " + navigator.platform  + "; ";
  txt+= "User-agent header: " + navigator.userAgent  + "; ";
  console.log("NavigatorExample", txt);
}
  </pre>
</figure>
{{EmbedLiveSample("Frammenti_di_codice", "100%", 250)}}

Citazioni

<figure>
  <figcaption><cite>Edsger Dijkstra:</cite></figcaption>
  <blockquote>If debugging is the process of removing software bugs,
  then programming must be the process of putting them in.</blockquote>
</figure>
{{EmbedLiveSample("Citazioni")}}

Poemi

<figure>
  <p style="white-space:pre">
Bid me discourse, I will enchant thine ear,
  Or like a fairy trip upon the green,
Or, like a nymph, with long dishevell'd hair,
  Dance on the sands, and yet no footing seen:
Love is a spirit all compact of fire,
  Not gross to sink, but light, and will aspire.</p>
  <figcaption><cite>Venus and Adonis</cite>,
    by William Shakespeare</figcaption>
</figure>
{{EmbedLiveSample("Poemi", "100%", 250)}}

Specifiche

Specification Status Comment
{{SpecName('HTML WHATWG', 'semantics.html#the-figure-element', '<figure>')}} {{Spec2('HTML WHATWG')}}
{{SpecName('HTML5.2', 'grouping-content.html#the-figure-element', '<figure>')}} {{Spec2('HTML5.2')}} Nessun cambiamento da HTML 5.0.
{{SpecName('HTML5 W3C', 'grouping-content.html#the-figure-element', '<figure>')}} {{Spec2('HTML5 W3C')}}

Compatibilità dei browser

{{Compat("html.elements.figure")}}

See also