Will HTML 5 validation be worth the candle?

前端 未结 6 772
青春惊慌失措
青春惊慌失措 2020-12-08 07:14

It\'s widely considered that the best reason to validate one\'s HTML is to ensure that all browsers will treat it consistently and predictably.

The HTML 5 draft, h

6条回答
  •  情书的邮戳
    2020-12-08 07:46

    Validation has never really been about getting consistent results across browsers, even before HTML5 began. That's a myth propagated by those who don't understand what they're talking about, even if they think they do.

    The real reason for validation is and always has been purely an issue of quality assurance. It's just a way of detecting errors, which . Even though results for any given error may be, or may soon become, consistent among browsers, it's still possible that the result itself is not as intended.

    It's important for authors to be able to catch errors in their code because cleaner, error free markup is easier to work with and maintain, especially when working in a team environment. While most individual errors may end up being benign and not cause any major problems, there are some that can give unexpected results. e.g. Incorrectly, overlapping or unclosed elements can cause unexpected layout problems in some cases, and letting a validator tell you where the error is, helps in rectifying the problem. But if the results are filled with dozens of otherwise benign errors, it can make the detection and process more difficult than need be.

提交回复
热议问题