Why Panoramio is not XHTML/CSS valid?
In my previous post Fade in and out I said that I didn’t care about Panoramio not being xhtml/css valid.
If that sounds weird, it’s just because people have forgotten the real goal of validating a site. Validation is a mean, not an end.
The goal is to have a site as cross browser as possible, so that any potential user is able to enjoy it. Validation is a tool to use towards this goal, but it is not the only tool, and not even the most useful one.
Even if people where using fully compliant browsers to see your site (and we all know they are not), there are an awful lot of things that are just not in the specification and can ruin the look of a perfectly valid page. For instance, the standard is silent about the default margin, color and font that a browser should use for any element. There are very good reasons to not specify such things. Font names are not the same between different systems, for instance. But the point is that if you don’t really test your page against different browsers, no matter how much does your page validate, it may still look awful for a lot of your visitors.
You can also experience the reverse. You can have a non valid page that is perfectly usable on a 100% standard browser. And I don’t mean that “almost everything will work”, I really mean perfectly usable! The XHTML / CSS standards says how a XHTML / CSS document should look, and it also says how a compliant browser should behave in the presence of certain invalid documents. For instance, unknown attributes should be ignored.
It is thus perfectly legal to invent new attributes, and give them a particular meaning with javascript (just remember that your user may not have javascript activated). Any compliant browser will render your page without a glitch. The only downside is that your page will not be anymore XHTML valid. But if you concern is to have webpages that can be read and used with any browser, you will not have a single problem with this strategy.
This trick is used in our login and register forms in Panoramio, to explicit what test should be run by the client on each field before the form is submitted. E-mails should be real e-mails, some fields are mandatory, that kind of thing. The result is much cleaner than adding these tests ad-hoc in javascript. (Note that this framework is not yet finished, and thus the javascript code still does some tests in an ad-hocist manner.)
Archives
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
Categories
- css (2)
- html (8)
- Interaction Design (6)
- javascript (11)
- miscellaneous (25)
- new features / improvements (79)
- panoramio (61)
- personal (2)
- places (25)
- Uncategorized (10)
No Responses to “Why Panoramio is not XHTML/CSS valid?”
Please Wait
Leave a Reply