What is the most semantic way to display a street address in HTML?

后端 未结 4 1599
礼貌的吻别
礼貌的吻别 2020-12-23 20:37

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 rec

4条回答
  •  情歌与酒
    2020-12-23 20:59

    You can use the Schema.org vocabulary's PostalAddress item for this. It can be used via Microdata, RDFa, or JSON-LD.

    For example, using RDFa:

    Google Inc. P.O. Box1234 Mountain View, CA 94043 United States

    AFAIK, this should also be valid with

    in place of the enclosing
    :

    Google Inc. P.O. Box1234 Mountain View, CA 94043 United States

提交回复
热议问题