What HTML tags are there for address information?

一世执手 提交于 2019-12-12 11:14:59

问题


What address related tags are there for address and formatting and marking my address information in my webpages? I'm looking for XHTML or HTML5 compliant tags.


回答1:


There is the semantic <address> tag. You may also want to take a look at the hCard microformat.




回答2:


<address> from W3C:

The address element provides contact information for a document or part of a document. Information provided by address may include the names of the document’s maintainers, links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The address element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document. W3C HTML5 specification

Use <address> for addresses that are in fact the relevant contact information for a document or section of a document. Do not use it to represent arbitrary addresses.

For more detailed Address information it is recommended to use Microdata. Search Engines recognize Microformats, Microdata and RDFa, but Microdata is recommended.

Here is the Microdata Postal Address page with examples.You will be able to specify streetAddress, postalCode, telephone etc.




回答3:


vcard in Microformats - http://microformats.org/wiki/hcard-examples

vcard in Microdata - http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#vcard

vcard in RDFa - http://www.w3.org/TR/vcard-rdf/#Exa




回答4:


You can use <address> tag. Go to following link for details. http://dev.w3.org/html5/spec/the-address-element.html#the-address-element



来源:https://stackoverflow.com/questions/4342457/what-html-tags-are-there-for-address-information

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!