
A cautionary tale about xhtml validators
I've been continuing to tweak the pages at RealLifeDebt.com and have wanted to ensure that the xhtml coding was all proper and correct. So, logically, I turned to the W3C online validator, but kept hitting this one error:
Below are the results of attempting to parse this document with an SGML parser. Line 195, column 45: there is no attribute "onClick"Round and around I went until it dawned on me (thanks to a quick web search) that the problem wasn't that there's no attribute onclick, but that there's no attribute onClick: the 'C' can't be capitalized! I fixed that, and now can happily add:
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
HTML and CSS
(Article 3669)
Tagged: Previous: An experiment in xhtml and css: real-life-debt.com Next: Interesting JavaScript code example: finance calculator Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. Whoa -- so that's the solution. After a couple hours with that error message I decided to google for it and promptly found your message up there. Phew. Thanks. :) Posted by: Sven at February 11, 2004 3:52 PMGlad to help. You might well be interested in a copy of my upcoming book "Creating Cool Web Sites with HTML, XHTML and CSS" (Wiley, coming out in April 2004) wherein I talk at length about why and how to validate pages and style sheets. Posted by: Dave Taylor at February 11, 2004 6:30 PMDamn... After 20 mn pulling my hair with the validator, I Googled another 20 mn to find your post. Sure enough... I had capitalized the "C" Back to work... Posted by: Mr. X at March 8, 2004 8:42 PMThis isn't the first time I've wondered why these validators do such a miserable job of error messages. Seems like instead of just spitting out "INVALID XML STRUCTURE" or something they could actually have some smarts... Interesting, twenty years ago while working at HP R&D Labs in Palo Alto (across the street from Stanford, actually) I remember reading these excellent research reports out of IBM's Thomas J. Watson Research Center all about what makes a good error message. And here we are, all this time later, and developers still aren't paying attention... Posted by: Dave T. at March 8, 2004 9:52 PMWOW amazing help when i'm coding at 5:30am before my assignment is due in 7 hours. you're a genius. thanks SO MUCH Posted by: reid at May 18, 2005 1:33 PMThank you thank you THANK YOU! Stupid capitalized C, wasting an hour of my time... Posted by: Heather at July 30, 2006 12:44 PMThanks so much for this article; I was facing the same problem. W3C actually specifies that in XHTML everything must be lowercase, but I guess I need to find your article to realize this simple thing... thanks!
CAUTION!: Dreamweaver 8 automatically capitalizes all onclick, onchange, and such events, in just the very moment you open the file!!! I hate when editors change code without any notice, specially when the changes are wrong, like this. OMA Posted by: OMA at June 6, 2007 4:15 AMWell your old article is still helping people, namely me. You just solved my problem in a heart beat. I can't thank you enough and just wish I had searched for the answer hours ago. Dreamweaver 8 capitalised the onLoad, oClick and onMouseOver on all links in the navigation bar. Only one more error to fix! Posted by: Fenix Webmaster at August 24, 2007 3:33 PMI have a lot to say, but ...
I do have a comment, now that you mention it!
|
![]()
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|