W3C home > Mailing lists > Public > www-style@w3.org > July 2002

Re: a:hover and a:active and named anchors

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Thu, 25 Jul 2002 14:47:29 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>, Jerry Baker <jerrybaker@attbi.com>
CC: Stuart Ballard <sballard@netreach.com>, www-style <www-style@w3.org>
Message-ID: <B965C001.125A5%tantek@cs.stanford.edu>

On 7/25/02 2:28 PM, "Boris Zbarsky" <bzbarsky@MIT.EDU> wrote:

>> Although I might be ignorant of some other purpose of which I haven't
>> thought, why can't named anchors be specifically excluded from :hover
>> and :active?
> Because CSS is markup-language-independent and thus has no concept of a
> "named anchor".  All it knows is that there is a <a> element.  Any other
> semantics are attached to the <a> by the document language, which
> happens to be HTML in this case.


Also, please note that named anchors are have been _removed_ from XHTML 1.1.


So, really what you _should_ do is stop using named anchors, and use the
"id" attribute instead directly on the target element (i.e. don't use an
unnecessary <a> element at all for the destination of a hyperlink), which is
much better structurally than those empty named anchors that litter the web.

> Keep in mind that CSS is not an adjunct to HTML but an adjunct to
> XML-based markup languages in general.

Exactly.  Thanks Boris.

Received on Thursday, 25 July 2002 17:40:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:02 UTC