16

With us moving continually closer to HTML5 in terms of adoption, is writing HTML for validity something the web is rejecting, allowing us to straddle standards as the web continues to be in a perpetual state of transition to the "next" thing?

Is validation important?

  • If so, what is the net gain?
  • If not, why not?
jondavidjohn
  • 843
  • 1
  • 6
  • 14

4 Answers4

12

Validation will always be important, but during times of transition from one standard to another it's very difficult to pull off. It's especially hard when the standard isn't even finalized and agreed upon yet. So while validation is important, business is more important and simply won't wait for validation. So there will inevitably be some indefinite transitional period where validation will be summarily discarded in many cases until a more stable standard is reached and implemented that can provide a reliable basis for validation.

Html5 is "out", but it isn't set to be finalized until 2014 sometime.

Joel Etherton
  • 11,674
  • 6
  • 45
  • 55
  • 1
    So it's less important than the business, but does the business have anything to gain by having their markup be validated? I guess my thought is that it can't be **important** and at the same time just be a "nice to have". – jondavidjohn Feb 09 '12 at 18:17
  • @jondavidjohn: Yes, there's a gain but it's seen only on the bottom line when it comes to maintenance. If a page validates, it is less likely to require massive maintenance across the browser platforms. However, that gain is minor in comparison to potential work stoppage. I would say it's more than a "nice to have", but I can guarantee you no one outside of IT is really losing any sleep over it. – Joel Etherton Feb 09 '12 at 18:24
8

HTML validation isn't a huge deal deal for a few reasons, that don't really have anything to do with HTML 5.

  1. It doesn't really mean anything other than some group says this is right, if you did everything else right a validator can't check.
  2. HTML isn't source code for a vast majority of projects, other things are generating HTML and you have limited power over influencing how that is done.
  3. The only thing that has ever really mattered is it works in popular browsers and validation has traditionally been a mediocre guarantee of that.
Ryathal
  • 13,317
  • 1
  • 33
  • 48
3

HTML 4.01 Strict Validation is one of my automated tests in my ATDD test suite.

For us validation is important because of consistency of browser behavior. So if you don't need consistency of behavior across different browsers (and browser versions), then it's probably more of a nice-to-have.

Driving consistency of behavior for all your pages makes the following cheaper:

  • more uniform behavior
  • more uniform placement
  • page "tweaking"
  • easier ADA compliance (remember Target, Walmart, and other have been sued over this)
dietbuddha
  • 8,677
  • 24
  • 36
  • 4
    Since when has W3C validation guaranteed cross browser consistency? I just think the gain of using newer tech that's (mostly) adopted has a much higher upside then breaking validation has in downside. – jondavidjohn Feb 09 '12 at 18:57
  • 2
    @jondavidjohn: It hasn't guaranteed cross browser consistency, but it's been as close as we can get since no such guarantee exists. You can refer to this: http://hsivonen.iki.fi/doctype/ on how doctype choice determines rendering, and how quirks mode for "tag-soup" is harder to get consistent behavior for page to page. – dietbuddha Feb 09 '12 at 19:54
0

For once, Google penalizes websites with HTML errors, not sure how much.

They do the same with slowly loading pages, and HTML rendering is a CPU extensive task and doing something incorrectly forces the browser to "guess" the correction, this slows down the page rendering time and even worse browsers often guess wrong.

As a page gets complicated by other dynamically inserted elements with invalid HTML, chances that whatever was detected/ignored by the browser will now becomes in effect, and that cost more to fix than initially considering validating HTML.

doc_id
  • 149
  • 7