{{HTMLRef}}
L'element HTML <address> proporciona informació de contacte per el seu element mes proper {{HTMLElement("article")}} o ancestre {{HTMLElement("body")}} ; en aquest últim cas, s'aplica a tot el document.
Nota d'us:
- Per representar una adreça arbitrària, que no està relacionada amb la informació de contacte, utilitzar un element {{HTMLElement("p")}} en lloc de l'element <address>.
- Aquest element no ha de contenir més informació que la informació de contacte, com una data de publicació (que pertany a un element {{HTMLElement("time")}}).
- Normalment, un element <address> pot ser col·locat dins de l'element {{HTMLElement("footer")}} de la secció actual, si n'hi ha.
Categories de contingut | Contingut de flux , contingut palpable. |
---|---|
Contingut permès | Contingut de flux, pero sense cap element <address> niu, sense continguts de capaçalera ({{HTMLElement("hgroup")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}), sense continguts de secció ({{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("section")}}, {{HTMLElement("nav")}}), i sense elements {{HTMLElement("header")}} o{{HTMLElement("footer")}}. |
Omissió de l'etiqueta | {{no_tag_omission}} |
Elements pares permesos | Qualsevol element que accepti Contingut de flux. |
Interfície DOM | {{domxref("HTMLElement")}} Abans de Gecko 2.0 (Firefox 4), Gecko implementa aquest element utilitzant la interficie {{domxref("HTMLSpanElement")}} |
Atributs
Aquest element només inclou els atributs globals.
Exemple
<address> You can contact author at <a href="https://www.somedomain.com/contact">www.somedomain.com</a>.<br> If you see any bugs, please <a href="mailto:[email protected]">contact webmaster</a>.<br> You may also want to visit us:<br> Mozilla Foundation<br> 1981 Landings Drive<br> Building K<br> Mountain View, CA 94043-0801<br> USA </address>
Resultat del codi HTML:
Encara que l'element address representa el text amb el mateix estil predeterminat com els elements {{HTMLElement("i")}} o {{HTMLElement("em")}}, és més apropiat utilitzar-la quan es tracta d'informació de contacte, ja que transmet la informació semàntica addicional.
Especificacions
Especificació | Estat | Comentari |
---|---|---|
{{SpecName('HTML WHATWG', 'sections.html#the-address-element', '<address>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'sections.html#the-address-element', '<address>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'struct/global.html#h-7.5.6', '<address>')}} | {{Spec2('HTML4.01')}} |
Navegadors compatibles
{{CompatibilityTable}}
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | {{CompatVersionUnknown}} | {{CompatGeckoDesktop("1.7")}} | 1.0 | 5.12 | 1.0 |
Característica | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mini | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | {{CompatVersionUnknown}} | {{CompatGeckoMobile("1.7")}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Veure
- Altres elements relacionats amb la secció: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("footer")}}, {{HTMLElement("section")}}, {{HTMLElement("header")}};
- Seccions i línies generals d'un document HTML5.