views:

127

answers:

2

What are cons if we do not care about validation of XHTML and CSS? Errors other than CSS 3 and vendor specific properties

  • In terms of development time(How valid XHTML and CSS code save time to find problems?),
  • Code debugging (How we can track then problem quickly?),
  • Cross browser compatibility (How it helps us to achieve cross browser compatibility?),
  • Website maintainability (How it would be helpful to maintain and update for someone else?),
  • Future changes in website (How it would be helpful to make any changes in design if client can ask in future?),
  • SEO ranking (How it can affect our site's search engine ranking?)
  • Accessibility (Does validity of code increase accessibility of site?)

I have to explain a client's Secretary,Code validation is not just Fashion, it is beneficial for his site. I'm not just advocating of this to make more money. it's not useful only for developer it mainly beneficial for his website.

+3  A: 

There's the obvious point that if your markup is valid, the odds of it being rendered as you want it to be by a wide variety of browsers are improved.

But separate from that, sometimes you spend valuable development time tracking down bugs (usually ones that seem specific to a given browser) only to find that the reason for the bug is that your markup is invalid and different browsers are handling the invalid markup in different ways. Validating (whether it's XHTML or HTML) saves you time tracking down those sorts of problems. There was an example here just yesterday, in fact. The OP thought he was having a weird Firefox-specific jQuery problem. In fact, he just had invalid markup, and fixing the markup fixed his problem.

So I'm thinking that you tell the client that validation saves time, and therefore money.

Note that this is an argument for validating, not for proclaiming validity (via icons and such).

T.J. Crowder
+1 you answer is good. and example also. What are your opinions on SEO and accessibility?
metal-gear-solid
@metal-gear-solid: If you want your site to be found and indexed properly, then you need to ensure that the content is in the HTML; dynamically-added content won't be indexed AFAIK (but I am not an SEO expert). I don't know enough about the current state of the art in accessibility programs like screen readers and such to have an opinion, except that you can be sure they will handle content that's actually in the HTML, whereas I bet it gets a lot more spotty and tool-dependent with content added after the initial rendering.
T.J. Crowder
@T.J. Do you know, Does web crawlers have any problem with non-valid code?
metal-gear-solid
They have to parse HTML just like any other user agent. Their ability to cope with bad HTML is as variable as any other user agent.
David Dorward
@metal-gear-solid: What David said. :-)
T.J. Crowder
+1  A: 

I found some very good answers here

http://validator.w3.org/docs/why.html

http://ianpouncey.com/weblog/2010/01/web-accessibility-myths/

Using markup improperly -- not according to specification -- hinders accessibility. Misusing markup for a presentation effect (e.g., using a table for layout or a header to change the font size) makes it difficult for users with specialized software to understand the organization of the page or to navigate through it. Furthermore, using presentation markup rather than structural markup to convey structure (e.g., constructing what looks like a table of data with an HTML PRE element) makes it difficult to render a page intelligibly to other devices (refer to the description of difference between content, structure, and presentation).

http://www.w3.org/TR/WAI-WEBCONTENT/#gl-structure-presentation

metal-gear-solid