mozilla

Revision 298008 of <address>

  • Revision slug: HTML/Element/address
  • Revision title: address
  • Revision id: 298008
  • Created:
  • Creator: elektronikLexikon
  • Is current revision? No
  • Comment

Revision Content

Summary

The HTML Address Element (<address>) may be used by authors to supply contact information for its nearest {{ HTMLElement("article") }} or {{ HTMLElement("body") }} ancestor; in the latter case, it applies to the whole document.

Usage note:

  • To represent an arbitrary address, one that is not related to the contact information, use a {{ HTMLElement("p") }} element rather than the <address> element.
  • This element should not contain more information than the contact information, like a publication date (which belongs in a {{ HTMLElement("time") }} element).
  • Typically an <address> element can be placed inside the {{ HTMLElement("footer") }} element of the current section, if any.

Usage context

Permitted content Flow content, but with no nested <address> element, no heading content ({{ HTMLElement("hgroup") }}, {{ HTMLElement("h1") }}, {{ HTMLElement("h2") }}, {{ HTMLElement("h3") }}, {{ HTMLElement("h4") }}, {{ HTMLElement("h5") }}, {{ HTMLElement("h6") }}), no sectioning content ({{ HTMLElement("article") }}, {{ HTMLElement("aside") }}, {{ HTMLElement("section") }}, {{ HTMLElement("nav") }}), and no {{ HTMLElement("header") }} or {{ HTMLElement("footer") }} element
Tag omission None, both the start tag and the end tag are mandatory
Permitted parent elements

Any element that accepts flow content

Normative document HTML5, section 4.4.10 ({{ HTMLVersionInline(4) }}: HTML4.01, section 7.5.6)

Attributes

This element has no other attributes than the global attributes, common to all elements.

DOM Interface

This element implements the HTMLElement interface.

Implementation note: Prior to Gecko 2.0 {{ geckoRelease("2.0") }}, Gecko implemented this element using the HTMLSpanElement interface.

Example

  <address>
    You can contact author at <a href="http://www.somedomain.com/contact">www.somedomain.com</a>.<br>
    If you see any bugs, please <a href="mailto:webmaster@somedomain.com">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>

Above HTML will output:

Image:HTML-address.png

Although the address element renders text with the same default styling as the {{ HTMLElement("i") }} or {{ HTMLElement("em") }} elements, it is more appropriate to use when dealing with contact information, as it conveys additional semantic information.

Browser compatibility

{{ CompatibilityTable() }}

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support {{ CompatGeckoDesktop("1.7") }} 1.0 1.0 5.12 1.0
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mini Opera Mobile Safari Mobile
Basic support {{ CompatVersionUnknown() }} {{ CompatGeckoMobile("1.7") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }}

See also

  • Others section-related elements: {{ 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") }};
  • Sections and outlines of an HTML5 document.
{{ HTML:Element_Navigation() }}
{{ languages({ "ja": "ja/HTML/Element/address", "pl": "pl/HTML/Element/address" }) }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The HTML Address&nbsp;Element (<code>&lt;address&gt;)</code> may be used by authors to supply contact information for its nearest {{ HTMLElement("article") }} or {{ HTMLElement("body") }} ancestor; in the latter case, it applies to the whole document.</p>
<div class="note">
  <p><strong>Usage note:</strong></p>
  <ul>
    <li>To represent an arbitrary address, one that is not related to the contact information, use a {{ HTMLElement("p") }} element rather than the <span style="font-family: Courier New;">&lt;address&gt;</span> element.</li>
    <li>This element should not contain more information than the contact information, like a publication date (which belongs in a {{ HTMLElement("time") }} element).</li>
    <li>Typically an <span style="font-family: Courier New;">&lt;address&gt;</span> element can be placed inside the {{ HTMLElement("footer") }} element of the current section, if any.</li>
  </ul>
</div>
<h2 id="Usage_context">Usage context</h2>
<table class="fullwidth-table" style="width: 1125px; height: 117px;">
  <tbody>
    <tr>
      <td>Permitted content</td>
      <td><a href="/en/HTML/Content_categories#flow_content" title="en/HTML/Content categories#flow content">Flow content</a>, but with no nested <span style="font-family: Courier New;">&lt;address&gt;</span> element, no heading content ({{ HTMLElement("hgroup") }}, {{ HTMLElement("h1") }}, {{ HTMLElement("h2") }}, {{ HTMLElement("h3") }}, {{ HTMLElement("h4") }}, {{ HTMLElement("h5") }}, {{ HTMLElement("h6") }}), no sectioning content ({{ HTMLElement("article") }}, {{ HTMLElement("aside") }}, {{ HTMLElement("section") }}, {{ HTMLElement("nav") }}), and no {{ HTMLElement("header") }} or {{ HTMLElement("footer") }} element</td>
    </tr>
    <tr>
      <td>Tag omission</td>
      <td>None, both the <span title="syntax-start-tag">start tag</span> and the <span title="syntax-end-tag">end tag</span> are mandatory</td>
    </tr>
    <tr>
      <td>Permitted parent elements</td>
      <td>
        <p>Any element that accepts <a href="/en/HTML/Content_categories#flow_content" title="en/HTML/Content categories#flow content">flow content</a></p>
      </td>
    </tr>
    <tr>
      <td>Normative document</td>
      <td><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-address-element" rel="external nofollow" target="_blank" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-address-element">HTML5, section 4.4.10</a> ({{ HTMLVersionInline(4) }}: <a class="external" href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-ADDRESS" title="http://www.w3.org/TR/REC-html40/struct/global.html#edef-ADDRESS">HTML4.01, section 7.5.6</a>)</td>
    </tr>
  </tbody>
</table>
<h2 id="Attributes">Attributes</h2>
<p>This element has no other attributes than the <a href="/en/HTML/Global_attributes" rel="internal">global attributes</a>, common to all elements.</p>
<div id="section_3">
  <div id="section_3">
    <h2 class="editable" id="DOM.C2.A0Interface">DOM&nbsp;Interface</h2>
    <p>This element implements the <code><a href="/en/DOM/element" title="en/DOM/element">HTMLElement</a></code> interface.</p>
    <div class="note">
      <strong>Implementation note:</strong> Prior to Gecko 2.0 {{ geckoRelease("2.0") }}, Gecko implemented this element using the <code>HTMLSpanElement</code> interface.</div>
  </div>
</div>
<h2 id="Example">Example</h2>
<pre class="brush: html">
  &lt;address&gt;
    You can contact author at &lt;a href="http://www.somedomain.com/contact"&gt;www.somedomain.com&lt;/a&gt;.&lt;br&gt;
    If you see any bugs, please &lt;a href="mailto:webmaster@somedomain.com"&gt;contact webmaster&lt;/a&gt;.&lt;br&gt;
    You may also want to visit us:&lt;br&gt;
    Mozilla Foundation&lt;br&gt;
    1981 Landings Drive&lt;br&gt;
    Building K&lt;br&gt;
    Mountain View, CA 94043-0801&lt;br&gt;
    USA
  &lt;/address&gt;
</pre>
<p>Above HTML will output:</p>
<p><img alt="Image:HTML-address.png" class="internal" src="/@api/deki/files/238/=HTML-address.png" /></p>
<p>Although the address element renders text with the same default styling as the {{ HTMLElement("i") }} or {{ HTMLElement("em") }} elements, it is more appropriate to use when dealing with contact information, as it conveys additional semantic information.</p>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Firefox (Gecko)</th>
        <th>Chrome</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatGeckoDesktop("1.7") }}</td>
        <td>1.0</td>
        <td>1.0</td>
        <td>5.12</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<table class="compat-table">
  <tbody>
    <tr>
      <th>Feature</th>
      <th>Android</th>
      <th>Firefox Mobile (Gecko)</th>
      <th>IE Mobile</th>
      <th>Opera Mini</th>
      <th>Opera Mobile</th>
      <th>Safari Mobile</th>
    </tr>
    <tr>
      <td>Basic support</td>
      <td>{{ CompatVersionUnknown() }}</td>
      <td>{{ CompatGeckoMobile("1.7") }}</td>
      <td>{{ CompatUnknown() }}</td>
      <td>{{ CompatUnknown() }}</td>
      <td>{{ CompatUnknown() }}</td>
      <td>{{ CompatVersionUnknown() }}</td>
    </tr>
  </tbody>
</table>
<h2 id="See_also">See also</h2>
<ul>
  <li>Others section-related elements: {{ 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") }};</li>
  <li class="last"><a class="deki-ns current" href="/en/Sections_and_Outlines_of_an_HTML5_document" title="en/Sections and Outlines of an HTML5 document">Sections and outlines of an HTML5 document</a>.</li>
</ul>
<div>
  {{ HTML:Element_Navigation() }}</div>
<div>
  {{ languages({ "ja": "ja/HTML/Element/address", "pl": "pl/HTML/Element/address" }) }}</div>
Revert to this revision