Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To what point is making an HTML page valid worth it?

Since a long time ago, when I found out about the W3C Validator, I made sure every HTML document I made was valid HTML.

However, I think sometimes it just isn't necessary to waste time making it valid. Of course, for actual Internet pages may be important, but is making pages on an Intranet, or even little front-ends that are used with other programs, when the HTML page renders correctly in the most used browsers (not necessarily counting IE 6 and 7).

I think I'm mostly talking about little improvements over code, such as wrapping every shown element of the page on <p> or <div> tags.

like image 784
Martín Fixman Avatar asked Jun 16 '10 03:06

Martín Fixman


People also ask

Why is validating HTML important?

W3C validation helps you to get better rankings in search engines (SEO). Errors in your code can affect your site's performance and make a big impact on your site's SEO. Search engines check the HTML or XHTML code of your website when searching.

Should I use an HTML validator?

In Summary. Validating any HTML you write as you build your websites will take the guesswork out of how the different browser rendering engines might render your website. This will help you to reduce the amount of time you spend debugging problems with your markup.

Why is it important to have your code approved by validators?

Valid code is more accessible as it's compliant with standards. It should work across more browsers and devices making it more usable and accessible. Different browsers may treat invalid code differently and sometimes in unexpected ways. Some will probably tell you that valid code will help your pages rank better.

What is the purpose of code validation?

Code validation is the process of checking that the coding of a web page is in compliance with the standards and recommendations set by the World Wide Web Consortium (W3C) for the web. Code validation helps to produce clean code.


1 Answers

Making a page validate for its own sake is not really a business proposition. What happens for end-users (with their cranky browsers) is the real test.

That said, validating periodically will help you debug. It'll catch the more salient errors like unclosed tags. Which, in turn, does affect end-users. So treat validation like compiler warnings -- good for discipline.

like image 84
Matt Sherman Avatar answered Oct 20 '22 19:10

Matt Sherman