W3C home > Mailing lists > Public > www-validator@w3.org > August 2015

Re: bug

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 30 Aug 2015 22:33:30 +0300
To: Skip Geel <skipgeel@gmail.com>, W3C Markup Validator list <www-validator@w3.org>
Message-ID: <55E35A8A.2000805@cs.tut.fi>
30.8.2015, 21:15, Skip Geel wrote:

> The current version reports a new CSS feature as an error.

The error message has nothing to do with CSS.

> This CSS definition:
>
>      [large] { font-size: large; }
>
> allows this tag:
>
>      <B large>

CSS does not “allow” tags, but this usage of CSS and markup is as such 
correct. You can style an XML file that way. However, the HTML markup 
language has rules of its own, and they do not allow an attribute named 
“large” on a <B> element. This is purely a matter of HTML syntax; it has 
absolutely nothing to do with CSS—but it implies that you cannot validly 
style an HTML document that way.

> and yet your validator says this:
>
>      Attribute large not allowed on element b at this point.

Indeed. That’s correct, though a bit misleading; the phrase “at this 
point” has an interesting history, but usually, and here, it simply 
should not be there. An attribute named “large” is not allowed on the 
“b” element at any point.

What you can use in HTML is

<B class=large>

and then you need to modify the CSS rule to

.large { font-size: large; }

Yucca
Received on Sunday, 30 August 2015 19:34:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:13 UTC