Use html5 knowledge supplement -address elements

Using address information element to provide communication

Address element is defined in the specification "section element", and nav article or the like. Mainly because we believe it is more appropriate as a text-level semantics, syntax because it related to the text, rather than page layout.

Over the years, Web developers have been mistakenly used the address element. It does not display common mailing address (usually a "Contact Us" page) general manner. Therefore, following this use is wrong:

<address>Tom Leadbetter 1 My street United Kindom</address>

To clarify this point, HTML5 will address element is defined as: displaying communication information with its nearest article or body element.

What is the meaning of this definition? It means that you should use the address element to display communication information of the current article or the entire page. Because you can in the address article, so this means that you can address multiple elements in a single page. The contents of address elements can be an email address, website, phone number, email address or any other communication information.

Since the communication address information element is used, it is usually used in the footer of the address. The following example uses the two address elements: once for the main page of content, the other for display of the entire site.

<body>
<article>
    <header>
        <h1>My amazing blog entry</h1>

        <p>12.12.2011</p>
    </header>
    <p>Pellentesque habitant morbi tristique ....</p>
    <footer>
        This blog entry was written by
        <address><a href="#">Tom Leadbetter</a></address>
    </footer>
</article>

<footer>
    This site is owned by
    <address>
        <a href="#">Tom Leadbetter</a>
        <a href="mailto:[email protected]">test</a>
    </address>
</footer>
</body>    

Guess you like

Origin www.cnblogs.com/homehtml/p/12669529.html