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

Re: Document fragment anchor elements

From: Frank Tobin <ftobin@uiuc.edu>
Date: Thu, 10 May 2001 20:44:17 -0500 (CDT)
To: <www-html@w3.org>
Message-ID: <Pine.BSF.4.33.0105102042480.74423-100000@palanthas.neverending.org>
fantasai, at 21:25 -0400 on Thu, 10 May 2001, wrote:

    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.

Unfortunately, since <a>'s are inline elements, they cannot encompass
block-level elements, restricting the "text I'm linking to".

    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.

Yes, using id's of other elements is also a good solution.

-- 
Frank Tobin		http://www.uiuc.edu/~ftobin/
Received on Thursday, 10 May 2001 21:44:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:48 GMT