These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:18 pm Advanced search

Should <address> be more general-purpose?

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Should <address> be more general-purpose?

Postby Cerbera » Wed Feb 21, 2007 1:48 pm

In HTML4, the <address> element was defined as this:
W3C wrote: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.

(Source: HTML 4.01: The ADDRESS Element.)

In WHATWG's HTML5, it's defined as this:
WHATWG wrote:The address element represents a paragraph of contact information for the section it applies to.

...

The address element must not be used to represent arbitrary addresses (e.g. postal addresses), unless those addresses are contact information for the section.

(Source: Web Applications 1.0: The address element.)

This seems to be quite a rare scenario to have an element dedicated to. If it were more general, surely the element would become more useful? Somewhat like <dl> being used for more than just dictionary-like definitions.

As examples (numbered for convenience):
  1. A general point of contact where messages would ultimately get passed on to the person responsible for the section where the <address> was found.
  2. People or departments responsible for more than that section.
  3. People or departments of the organisation the website is for, even if they are not directly responsible for the section in which the <address> occurs. (Example: Calthorpe Park School's contact page.)
  4. Member's profiles in forum and other social network systems, who have limited control over that section. (They can edit their own contact details and perhaps other personal information in that section, but don't work for the website.)
  5. Providing contact details of any type for any person or organisation.
It may also be more intuitive that an element with a fairly generic name like "address" have fairly generic semantics.

Are there any implementations which rely on the current semantics? (AFAIK, there aren't.)

So then, should <address> be more general-purpose? (I think it should, if you hadn't guessed!)
Cerbera
<h4>
 
Posts: 34
Joined: Wed Feb 21, 2007 1:04 pm

Postby Phil Teare » Wed Feb 21, 2007 2:21 pm

Is an attribute out of the question? One to signify that the address is linked to a section. What about related=id where id is the id of the container element that relates to the address?

not set and you assume its just 'an address'.
Phil Teare
<h6>
 
Posts: 1
Joined: Wed Feb 21, 2007 2:16 pm

Postby zcorpan » Wed Feb 21, 2007 11:14 pm

From IRC:
Hixie wrote:yeah a lot of people have given feedback on <address> being useless
i don't disagree
not sure what to do about it
Lachy_ wrote:address could probably be redefined with much more sensible and useful semantics. Instead of just restricting it to contact information for the author, allow it to be used for any contact details, like in hCard


I guess the questions are:
  • How are most authors currently using it?
  • What can UAs or data mining tools potentially do with <address> (with specific semantics and generic semantics)?
I tend to believe that most authors use it for postal addresses or general contact information (not just strictly page author contact info as specified in HTML4). I don't know of any UA or data mining tool (other than the semantic extractor which just extracts the semantics because they're defined in HTML4), so the answer to the second question has to be "nothing fancy".

So why bother using <address> at all? Can we just drop it? Does it have any advantages?

Dropping elements also come at a cost however, and keeping them makes styling easier for authors (which is the same reason to keep <samp> for instance). So perhaps the best thing to do is to make the semantics in line with how most authors use it. But I'm not sure. :)
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby zcorpan » Thu Feb 22, 2007 12:17 am

Some stats:
Hixie wrote:so my last study (back in september, several billion documents) found slightly fewer pages using <address> than it found pages using <spacer>

about 1.15% of pages

jesus, that's a lot of <spacer> tags

the average page with an <address> tag used 1.7 <address> tags

my bet is that they're almost all auto-generated by tools, e.g. at the bottom of man pages

and that they're therefore actually probably semantically accurate today, ironically

other elements used on about the same number of pages as address, in order from most used to least used: colgroup col sup marquee legend big optgroup spacer address o:p frameset frame caption wbr

address is the 65th most used element in the sample i used

(on a per-page basis)
ok... so pages that use <address> are fairly the same amount as pages that use frames

although you see frames more often because you only have one frameset page per site, whereas pages that use <address> probably use it on every page on the entire site

(more likely than with framesets anyway)
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby Cerbera » Thu Feb 22, 2007 11:10 am

Lachy_ wrote:address could probably be redefined with much more sensible and useful semantics. Instead of just restricting it to contact information for the author, allow it to be used for any contact details, like in hCard
This is exactly what I'd like, if possible.

As zcorpan mentions, it makes styling addresses easier. And for beginners, using <address> could be easier than jumping in at the deep end with hCard. Small things, but still helpful imho.

The purpose of <address> is confusing. I've seen discussions much like that in many places. They often follow these stages:
  1. Someone starts a thread asking how they should use it.
  2. People expect it to be for any postal address.
  3. They find out other details are allowed (e-mail addresses, telephone numbers).
  4. Then a standardista arrives and says the details must only be for the author of that page:
    • There is sometimes a debate about whether it's strictly the author or whether the current owner/maintainer/editor is allowed.
  5. The thread starter either:
    • stops using the element for fear of using it wrongly;
    • or uses one <address> on their website's contact page.
Not everyone will ask on a forum or mailing list, though.

A lot of markup guides aren't clear about the strictness of <address>. The first three results on Google for "HTML address":
  1. W3Schools: "You should use it to define addresses, signatures, or authorships of documents."
    (Using "or" instead of "and" allows contact details for anyone?)
  2. HTML Code Tutorial: "<ADDRESS> denotes contact information for the author or organization of the web site."
    (General point of contact allowed.)
  3. HTML Dog: "Defines contact information, such as an address or a signature."
    (Contact details for anyone.)
I'd agree with zcorpan that it's likely being used more generally than HTML4 says it should. That's what popular tutorials are telling people to do.

In terms of data extraction, perhaps search engines could find it easier to answer searches relating to contact details if they were more commonly marked up with <address>? For example, people trying to find the contact details for a friend or family member.
Last edited by Cerbera on Thu Feb 22, 2007 11:05 pm, edited 4 times in total.
Cerbera
<h4>
 
Posts: 34
Joined: Wed Feb 21, 2007 1:04 pm

Should <address> be more general-purpose?

Postby sfraser » Thu Feb 22, 2007 6:40 pm

I've never used <address>: it is an inline element in HTML 4.01; I could not find consensus for its use; I could not understand any benefit for using it in conjunction with a URL (or, website address); and, I don't remember finding an official W3C document which used it. It wasn't used for the editors of the HTML 4.01 Recommendation, i.e.,


Code: Select all
<dd><a href="http://www.w3.org/People/Raggett">Dave Raggett</a> &lt;<a href=
"mailto:dsr@w3.org">dsr@w3.org</a>&gt;</dd>



HTML5 allows <address> to be block-level or strictly-inline (though the current specification does not show an example for block-level).


Block-Level

Code: Select all
<address>
<ul>
<li><a href="../People/Raggett/">Dave Raggett</a></li>
<li><a href="../People/Arnaud/">Arnaud Le Hors</a></li>
<li>contact persons for the <a href="Activity">W3C HTML Activity</a></li>
<li>$Date: 1999/12/24 23:37:50 $</li>
</ul>
</address>



Strictly-Inline

Code: Select all
<address>
<a href="../People/Raggett/">Dave Raggett</a>,
<a href="../People/Arnaud/">Arnaud Le Hors</a>,
contact persons for the <a href="Activity">W3C HTML Activity</a><br>
$Date: 1999/12/24 23:37:50 $
</address>



Maybe, if the HTML5 specification included both block-level and strictly-inline examples, more people would find a reason to use <address>.
sfraser
<h5>
 
Posts: 13
Joined: Tue Feb 06, 2007 11:17 pm
Location: Tustin, Calif.

Re: Should <address> be more general-purpose?

Postby zcorpan » Thu Feb 22, 2007 7:32 pm

sfraser wrote:I've never used <address>: it is an inline element in HTML 4.01;
No, it's a block-level element in HTML4. (The content model is inline, but that's not the same thing.)

sfraser wrote:HTML5 allows <address> to be block-level or strictly-inline (though the current specification does not show an example for block-level).
No, <address> in HTML5 is a block-level element. The content model is inline-level content.

sfraser wrote:Block-Level

Code: Select all
<address>
<ul>
<li><a href="../People/Raggett/">Dave Raggett</a></li>
<li><a href="../People/Arnaud/">Arnaud Le Hors</a></li>
<li>contact persons for the <a href="Activity">W3C HTML Activity</a></li>
<li>$Date: 1999/12/24 23:37:50 $</li>
</ul>
</address>
Here, the <address> is a block-level element (it always is), and it contains inline-level content. The <ul> above (which can be either block-level or structured inline) is structured inline (because <address> only allows inline children).

sfraser wrote:Strictly-Inline

Code: Select all
<address>
<a href="../People/Raggett/">Dave Raggett</a>,
<a href="../People/Arnaud/">Arnaud Le Hors</a>,
contact persons for the <a href="Activity">W3C HTML Activity</a><br>
$Date: 1999/12/24 23:37:50 $
</address>
Again, the <address> is block and its contents are inline. The <a> and <br> elements are strictly inline elements, so they are allowed where inline-level content is allowed (like in <address>).

Note also that "$Date: 1999/12/24 23:37:50 $" is not contact information and so is not appropriate to use in <address> (as currently defined).
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Should <address> be more general-purpose?

Postby sfraser » Thu Feb 22, 2007 8:02 pm

Zcorpan, your explanation has more clarity than the specification offers. :-)

Has anyone written about the difference between "HTML 4.01 inline" and "HTML5 inline-level" content? I missed that nuance in the HTML5 spec; and, I interpreted the HTML 4.01 Address definition
Code: Select all
<ELEMENT ADDRESS - - (%inline;)* -- information on author -->

differently.
sfraser
<h5>
 
Posts: 13
Joined: Tue Feb 06, 2007 11:17 pm
Location: Tustin, Calif.

Postby zcorpan » Thu Feb 22, 2007 10:56 pm

I agree that the inline/block concepts in HTML5 are a bit too complicated to grasp, and I've bugged Hixie to make them simpler. I can write something up when he goes ahead and does it (he said the significant inline thing will probably be dropped).
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby zcorpan » Tue Feb 27, 2007 5:54 pm

zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby wgabrie » Mon Apr 23, 2007 8:54 pm

I think the <address> tag should become a full section element, contain block-level content, and allow at least the "copyright" class.

I have found the need to place a full citation inside an unordered list, inside the address tag. While the <ul> tag can be considered an in-line element in HTML 5, I might also need to add addition information in a <p> tag.
wgabrie
<h4>
 
Posts: 25
Joined: Thu Apr 05, 2007 8:55 pm

Postby Cerbera » Sat Apr 28, 2007 1:03 pm

Even standards aware web authors are currently using <address> for contact details other than the document author. A recent example of this is Bright Finance.
Cerbera
<h4>
 
Posts: 34
Joined: Wed Feb 21, 2007 1:04 pm

Just go for it, relax the semantics

Postby Cecil Ward » Tue Jul 24, 2007 5:53 pm

Just go for it, relax the semantics a little, and allow it to become useful. Let it be used for any contact information section for any purpose. Any element that is UA-backwards-compatible is really valuable so lets take advantage of it.
Cecil Ward
<h6>
 
Posts: 1
Joined: Fri Apr 20, 2007 7:49 pm


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests