什么是在HTML中显示街道地址的最有语义的方式? [英] What is the most semantic way to display a street address in HTML?

查看:185
本文介绍了什么是在HTML中显示街道地址的最有语义的方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要显示在网页上的地址,但它不是该网页作者的地址。这应该如何编码为语义给予 w3c建议

I have an address that is going to be displayed on a webpage, but it is not the address for the author of the page. How should this be coded to be semantic given the w3c recommendation of:


作者可以使用ADDRESS元素为文档或文档的主要部分提供联系信息作为一种形式。此元素通常出现在文档的开头或结尾。

The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form. This element often appears at the beginning or end of a document.


推荐答案

您可以使用 hCard Microformat 来描述您的地址。微格式的优势在于,您可以在现有文档中使用它们以丰富它们。

You could use the hCard Microformat to describe your address. The advantage of Microformats is that you can use them in your existing documents to enrich them.

下面是一个从 Microformats wiki

<address class="vcard">
  <span class="adr">
    <span class="street-address">169 University Avenue</span>
    <span class="locality">Palo Alto</span>,  
    <abbr class="region" title="California">CA</abbr>&nbsp;&nbsp;
    <span class="postal-code">94301</span>
    <span class="country-name">USA</span>
  </span>
</address>

这篇关于什么是在HTML中显示街道地址的最有语义的方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆