views:

42

answers:

5

What is the best method to code contact info in x/html other than Microformats?

Is the use of <p> and <br/> is ok? or do we have any other good element?

<p><strong>London</strong>
<br/>
607,5th Floor, Oxford Towers,
<br/>
Airport Road, Kodihalli
<br/>
London 560 008
<br/>
Phone: 91-80- 4115 1705-706
<br/>
Fax: 91-80- 41151707
<br/>
Email:<a href="mailto:[email protected]"></a>
<br/>
Website:<a href="http://abc.com"&gt;abc.com&lt;/a&gt;
</p>
A: 

Why not ? It can be but as for me I prefer using divs.

or even tables.

oneat
Huh. Why tables over `<p>`?
Konrad Rudolph
div is standard container for data.
oneat
+1  A: 

You should use the address tag. And youre allowed to use other tags inside, like br, p, a, etc.

<address>
    Name<br/>
    Street, City<br/>
    Country<br/>
    Phone
    <a href="">Your site</a>
    <a href="mailto:">Your mail</a>
</address>
Tammo
Not unless it's the contact info of the page (or in HTML5, section) author.
Alohci
Youre right.But i would still put my post-adress in adress tags, even if its my contact page.
Tammo
A: 

Address element is used to supply contact information . http://xhtml.com/en/xhtml/reference/address/

krikulis
+2  A: 

You could use the <dl> tag to define a list of <dt> terms and their <dd> description if you want to better separate and maybe individually style every single item.

kemp
+3  A: 

<p> and <br> are fine, but as well as microformats, vcard contact details can be specified using microdata (http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#vcard) or RDFa (http://rdfa.info/wiki/Tutorials)

Alohci
+1 for microformats
Agos