Re: Attribute selector

On Nov 5,  9:28pm, eva wrote:

> "For example, the following rule matches all H1 elements that specify the
> "href" attribute, whatever its value:
> H1[href] { color: blue; }"

It's a valid selector, which selects no elements in a valid HTML file.

> Now, H1 doesn't take the href attribute. Does the above rule apply to H1's
> children or is it merely an abstract example?

It's a mistake ;-) Replace H1 with A

Now, it will select <A HREF="foo"> but will not select <A NAME="foo">
and make them blue. Which is a popular rendering - links in blue,
link targets are not in blue.

> You've done a fantastic job.Congratulation

Thanks. All comments gratefully received, keep them coming in.

Chris Lilley, W3C                          [ ]
Graphics and Fonts Guy            The World Wide Web Consortium              INRIA,  Projet W3C                       2004 Rt des Lucioles / BP 93
+33 (0)4 93 65 79 87       06902 Sophia Antipolis Cedex, France

Received on Wednesday, 5 November 1997 15:54:39 UTC