Forum Moderators: open

Message Too Old, No Replies

HTML validates, but still has errors!

Things the validators wonīt complain about.

         

andreasfriedrich

3:21 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Imagine you are going through all the trouble of validating your HTML output. You finally get it to validate ok. But there are still errors left.

Documents that include elements that set the style attribute but which don't define a default style sheet language are incorrect.

[w3.org ]

Do you use inline style information but donīt define a default style sheet language? I bet most do, I did until a read the above by chance.

Do you know of any more such "hidden" requirements in the HTML/XHTML/CSS specs?

Andreas

tedster

3:40 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let's drop the other shoe so people who read here know what they SHOULD do, according to the W3C. From the same W3C web page:

Authors should use the META element to set the default style sheet language for a document. For example, to set the default to CSS, authors should put the following declaration in the HEAD of their documents:

<META http-equiv="Content-Style-Type" content="text/css">

The default style sheet language may also be set with HTTP headers. The above META declaration is equivalent to the HTTP header:

Content-Style-Type: text/css

dingman

3:46 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks, Andreas! I had thought that "text/css" was the default unless otherwise specified. I tend to read the O'Reilly book from cover to cover, and then read the w3c docs in a disorganized out-of-order manner after. I wonder what else I've missed that way?