SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question help using the <address> tag properly

    Hi All, I need an accessible way of displaying contact details...

    I have two options and I'm open for any other suggestions. My page needs to validate XHTML 1.0 strict

    Option 1
    Code:
    <dl>
      <dt><address>San Marco Tile Centre  Bryanston</address></dt>
      <dd><address>Unit 1, Bryanston Blvd, 76 William Nicol Drv, Bryanston</address></dd>
      <dd><address>Tel: Fax: Facsimile: E-mail:</address></dd>
    </dl>
    Option2
    Code:
    <address>
    San Marco Tile Centre  Bryanston<br />
    Unit 1, Bryanston Blvd, 76 William Nicol Drv, Bryanston<br />
    Tel: Fax: Facsimile: E-mail:
    </address>
    Thanx in advance
    01010010 01010100 01000110 01001101

  2. #2
    Guru Meditation Error gnarly's Avatar
    Join Date
    Dec 2003
    Location
    Cheltenham, United Kingdom
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <address> is for marking up the contact details of the author of the document - not just any old address: http://www.autisticcuckoo.net/archiv...-element-types

    Personally, I think I'd use something based around a <dl>:
    Code:
    <dl>
       <dt>Address</dt>
       <dd>Postal address here</dd>
       <dt>E-mail</dt>
       <dd>blah@blah</dd>
       (etc...)
    </dl>
    I'd also mark it up to follow the hCard format (http://microformats.org/wiki/hcard). See http://thinkdrastic.net/contact/ for an example.
    Olly Hodgson
    thinkdrastic.net

  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx qnarly, that cleared it up for me, I too use the microformats hcard format, but the address tag confused me a bit...
    01010010 01010100 01000110 01001101

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's sort of a misnomer, and I think most developers get it wrong. It should have been named <contactinfo> or something.

    I normally use <address> for the page footer when it contains contact information. I also use it, albeit not 100% according to the spec, for generic contact information on 'Contact Us' pages.

    According to the spec, <address> can also mark up contact information for a part of a document.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •