W3C home > Mailing lists > Public > www-html@w3.org > May 2001

Re: Document fragment anchor elements

From: fantasai <fantasai@escape.com>
Date: Thu, 10 May 2001 21:25:07 -0400
Message-ID: <3AFB3F73.ABB638AD@escape.com>
To: www-html@w3.org
Dave J Woolley wrote:
> > From: glen@superexpert.com [SMTP:glen@superexpert.com]
> >
> > I'm confused regarding the reason why the A element that specifies an
> > anchor to a document fragment requires an ending tag.  What is the 
> > purpose of the end tag of an A element when it names an anchor to a 
> > document fragment?
> [DJW:]
> It's a consequence of using A for two purposes.  The closing
> tag cannot be conditional on the attributes.  The reason is
> possibly lost in time, as I don't know of anything that targets
> as having contents.

I always place my anchor tags around some significant bit of the
text I'm linking to. For instance, when I link to a heading, I
put the anchor tags around the heading text. The HTML 4.0 spec 
does this, too--take a look at the source. Point being, you're
linking to some information, not an empty string. This is why
HTML is moving away from <a> tags as link targets and using the 
id attribute of other elements instead--you link to a particular 
element and its contents.
Received on Thursday, 10 May 2001 21:23:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:57 UTC