What is correct way to show mailing addresses?

I’m needing to know the best way to code mailing addresses or different business locations. I’m working with 6 different locations. Any help would be greatly appreciated.

jodmcc

There is an <address> tag for that :). Call me stupid for using w3schools as an example but it allows you to see it in action :slight_smile:

The <address> tag defines the contact information for the author or owner of a document.

So the address tag would not be appropriate in the case given. You could use microformats :slight_smile:

Typically the ADDRESS, which is “meta data” is used for ‘contact’ addresses of the webmaster or owner of the site this can either be physical ‘bricks-and-mortar’ or logical as in an e-mail address, telephone number or feedback. The ADDRESS can also be used to provide contact information for a portion of a document, typically a FORM, i.e. contact details for an order form for additional information/questions.

As others have said, if it is the main contact point for the page in question, you can use the <address> element. But you shouldn’t use this for general postal addresses otherwise, then <div> or <p> will be a better bet.

Whether you use <address>, <p> or <div>, postal addresses are one of the examples where you can legitimately use <br> to separate the lines of the address.

I would be tempted to use purpose built microformats to present the address, this allows search engines, social networks and address book software (supporting hCard or converted vCard) to import the contents (a good thing for your site). It’s just something to give your code some “extra” semantic value. :slight_smile:

http://microformats.org/wiki/hcard#Live_example