The Address Tag

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am displaying a general contact in a page:

Email: some email
Address: some address
Phone: some phone

Should I use the Address tag for this and <br/> to change line.

I am also displaying on other part of the web site a list of person.
Each contact has a picture and contacts.
I am using a table. Left column for the person picture, right column
for the person contacts.

Now that I am using a table tell me I am wrong ... :-)

Again, should I use the address tag to wrap the contacts?


Re: The Address Tag


Quoted text here. Click to load it

Here's what the spec says about the ADDRESS element:

 The ADDRESS element may be used by authors to supply contact information
 for a document or a major part of a document such as a form.

Quoted text here. Click to load it

Using TABLE to mark up tabular data is reasonable, but there are different
ways to mark up a table. A URL might give us more to work with.


Re: The Address Tag

Quoted text here. Click to load it
<address> is "contact information for a document or a major part of a
document"  So it's restricted (according to the spec) to being related
to the document's author or publisher, not for general address
formatting of "data" on the page.

Secondly, the content model of <address> is %inline; not %block; or
%flow;, i.e. it's like <p> rather than like <div>   This is bad. You
might well want to place block elements within an address, not just
inline. Particularly (see your other post) <dl>, if you want a way of
marking up property / value information so that it's more easily
processable in the future (including by CSS).

Personally I'd use <div class="address" >, or even (if I knew that its
content would always be list-like) <dl class="address" >
In particular, my metastructure definition for coding the site would
state this:

It would state that <div class="address" > or <dl class="address" >
were both acceptable ways of coding such an address, as indeed was
<div class="address" > ( <dl > | %block; ) </div>   (I might
potentially want to mix property / value with a free-format <p> )
but that   <div class="address" > ... <dl class="address" > was NOT
supported, and was considered an error of markup.

Writing this metastructure down clearly makes it much easier to build
the site. HTML coders know to use <dl class="address" >
"bare" (without wrapping it in a <div>) in the simple case.  The CSS
authors know that they need to support both of those forms correctly,
but that they don't need to worry about their looks when they're
nested, because that has been forbidden anyway.

Site Timeline