Re: Feedback on Markup Validation Service

On Wed, 11 Jun 2003, Dane Harkin wrote:

> Whilst I was attempting to validate some html code, I stumbled across
> the following
>
> there is no attribute "COLOR"
> Code: <td colspan="4"><hr color="#333366" noshade></td>

That's because you asked it to validate it against a DTD that has no such
attribute.

> I don't understand why "color" cannot be added as an attribute to <hr>.

Of course it can. You can add any attributes you like. If you wish to
validate, then you need to create a modified DTD.

> Is it possible to suggest that the tag <hr> include the attribute color
> in the validation process?

No, validation does not deal with any suggestions. It simply checks
whether the document complies with some formal rules that you specify,
either directly or (as usual) indirectly via a reference to a catalogued
DTD. More on this: http://www.cs.tut.fi/~jkorpela/html/validation.html

(On the practical side, the color attribute in <hr> is a nonstandard
extension recognized by some browsers, and it would be better to use CSS
to suggest the color - setting both the content color and the background
color is advisable - or, better still, use colored borders [in CSS] for
suitable elements instead.)

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Wednesday, 11 June 2003 06:52:23 UTC