- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Tue, 11 Dec 2007 19:12:04 +0200
- To: "David M. Riley" <rileydavidm@gmail.com>, <www-validator-css@w3.org>
David M. Riley wrote:
> T\I have read all the faq's and cannot validate my site. when I first
> tried it I got green, validation. I am having no more luck. Any
> suggestions Thanks http://www.thebloggiest.absorbs.com
Looks bad, 196 errors. But it's really not as bad as it sounds. The
first few errors are caused by using <BR> which is OK in classic HTML
but surely not in XHTML, which requires <br />. I guess this _is_ in the
FAQs... But are you sure you want to use XHTML? Really? Why? (Just
rhetoric questions.)
Anyway, much of the rest depends on XHTML as well. At line 73, you're in
the midst of a <script> element's content and generating markup (in a
rather non-XHTMLish way, I dare say: the idea is to play with elements
and the Document Object Model, not to use strings containing markup to
be parsed), there you have <a ... which opens an <a> element, which is
not permitted inside a <script> element. The point is XHTML has a
different content model for <script>, so you can't just write markup as
such there, even if it is string data in scripting terms (which terms
mean nothing to a validator). There's something about this in the FAQs
I'm sure, but the bottom line is that any bulky piece of JavaScript code
is best written in a separate file, invoked via <script ... src="...">,
thereby avoiding the issue.
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Received on Tuesday, 11 December 2007 17:12:06 UTC