 |
WHATWG HTML5 Forums A Forum for HTML5 Discussions: Semantics, DOM APIs, Microdata, Canvas, WebGL, Offline Web Applications, Local Storage, WebM Video, WebSockets, Web Workers, HTML5 Drag and Drop, HTML5 Forms, Accessibility, Syntax, News, Keywords, Yet More Keywords & More.
|
| View previous topic :: View next topic |
| Author |
Message |
Cerbera <h5>
Joined: 21 Feb 2007 Posts: 34
|
Posted: Wed Feb 21, 2007 1:48 pm Post subject: Should <address> be more general-purpose? |
|
|
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):
- A general point of contact where messages would ultimately get passed on to the person responsible for the section where the <address> was found.
- People or departments responsible for more than that section.
- 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.)
- 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.)
- 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!) |
|
| Back to top |
|
 |
Phil Teare <small>
Joined: 21 Feb 2007 Posts: 1
|
Posted: Wed Feb 21, 2007 2:21 pm Post subject: |
|
|
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'. |
|
| Back to top |
|
 |
zcorpan <h1>
Joined: 06 Feb 2007 Posts: 444 Location: Sweden
|
Posted: Wed Feb 21, 2007 11:14 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
zcorpan <h1>
Joined: 06 Feb 2007 Posts: 444 Location: Sweden
|
Posted: Thu Feb 22, 2007 12:17 am Post subject: |
|
|
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) |
|
| Back to top |
|
 |
Cerbera <h5>
Joined: 21 Feb 2007 Posts: 34
|
Posted: Thu Feb 22, 2007 11:10 am Post subject: |
|
|
| 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:
- Someone starts a thread asking how they should use it.
- People expect it to be for any postal address.
- They find out other details are allowed (e-mail addresses, telephone numbers).
- 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.
- 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":
- W3Schools: "You should use it to define addresses, signatures, or authorships of documents."
(Using "or" instead of "and" allows contact details for anyone?)
- HTML Code Tutorial: "<ADDRESS> denotes contact information for the author or organization of the web site."
(General point of contact allowed.)
- 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 |
|
| Back to top |
|
 |
sfraser <h6>
Joined: 06 Feb 2007 Posts: 13 Location: Tustin, Calif.
|
Posted: Thu Feb 22, 2007 6:40 pm Post subject: Should <address> be more general-purpose? |
|
|
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: | <dd><a href="http://www.w3.org/People/Raggett">Dave Raggett</a> <<a href=
"mailto:dsr@w3.org">dsr@w3.org</a>></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: | <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: | <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>. |
|
| Back to top |
|
 |
zcorpan <h1>
Joined: 06 Feb 2007 Posts: 444 Location: Sweden
|
Posted: Thu Feb 22, 2007 7:32 pm Post subject: Re: Should <address> be more general-purpose? |
|
|
| 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: | <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: | <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). |
|
| Back to top |
|
 |
sfraser <h6>
Joined: 06 Feb 2007 Posts: 13 Location: Tustin, Calif.
|
Posted: Thu Feb 22, 2007 8:02 pm Post subject: Should <address> be more general-purpose? |
|
|
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: | | <ELEMENT ADDRESS - - (%inline;)* -- information on author --> |
differently. |
|
| Back to top |
|
 |
zcorpan <h1>
Joined: 06 Feb 2007 Posts: 444 Location: Sweden
|
Posted: Thu Feb 22, 2007 10:56 pm Post subject: |
|
|
| 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). |
|
| Back to top |
|
 |
zcorpan <h1>
Joined: 06 Feb 2007 Posts: 444 Location: Sweden
|
|
| Back to top |
|
 |
wgabrie <h5>
Joined: 05 Apr 2007 Posts: 25
|
Posted: Mon Apr 23, 2007 8:54 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Cerbera <h5>
Joined: 21 Feb 2007 Posts: 34
|
Posted: Sat Apr 28, 2007 1:03 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Cecil Ward <small>
Joined: 20 Apr 2007 Posts: 1
|
Posted: Tue Jul 24, 2007 5:53 pm Post subject: Just go for it, relax the semantics |
|
|
| 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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|