【发布时间】:2010-12-25 14:35:15
【问题描述】:
在 html 中编码物理地址的最佳方法是什么?以语义、可访问性和 SEO 方式
【问题讨论】:
标签: html xhtml w3c web-standards
在 html 中编码物理地址的最佳方法是什么?以语义、可访问性和 SEO 方式
【问题讨论】:
标签: html xhtml w3c web-standards
使用微格式电子名片
<div class="vcard">
<span class="fn">Gregory Peck</span>
<a class="org url" href="http://www.commerce.net/">CommerceNet</a>
<div class="adr">
<span class="type">Work</span>:
<div class="street-address">169 University Avenue</div>
<span class="locality">Palo Alto</span>,
<abbr class="region" title="California">CA</abbr>
<span class="postal-code">94301</span>
<div class="country-name">USA</div>
</div>
<div class="tel">
<span class="type">Work</span> +1-650-289-4040
</div>
<div class="tel">
<span class="type">Fax</span> +1-650-289-4041
</div>
<div>Email:
<span class="email">info@commerce.net</span>
</div>
</div>
可访问:√
语义:我猜..
SEO:√Google announces support for microformats
更多示例请访问http://microformats.org/wiki/hcard-examples
另请查看Oomph Microformats toolkit,它可以帮助您显示和使用微格式。
【讨论】:
<address> 正是您要找的。p>
【讨论】:
address 不是正是您想要的。 address 仅用于标记有关当前查看页面的联系信息(如 Apache 404 默认错误页面和“Apache X.X at ...”行。
address 在语义上看起来是正确的。