Tags for this article: browser, css, html, invalid, javascript, php, valid code, validator, webdesign, webpage
The reason why people do not validate the HTML is that whenever they test, the page will seem to display without any problem. Why that is the web browsers, will be able to display the HTML, which is technically incorrect? Does this mean that we need not worry about the HTML or the invalid HTML (or PHP or JavaScript or CSS)?
For this the answer is:
When the web browsers were invented, most of the programmers recognized that there was much possibility that there would be thousands of people writing the HTML and creating the web pages as well. When so many people are trying to use the markup language or programming language like that of HTML, then it could be more frustrating quickly if each tiny results are shown in the page. So then, the programmers of the web browser decided that the browsers should be more forgiving.
All these means is that if the web browser views the WebPages, then it has the rule of HTML and it attempts to interrupt them in order to display your own WebPages. However, when it comes across something or the other, which is unexpected, from the older specification or incorrect, then the browser will ignore and tries to guess what the designer will want.
This will mean that a lazy or a novice designer will be able to get away with the incorrect code and have the pages that will display in browser window eve without a single problem. Some of the errors that occur are minor and the errors will be like that of leaving off alt attribute in the image tag. This is invalid technically but in anyway the browser will display the image. Some of the errors that occur are bigger kike that of leaving the closing the table tag off. In the old version of the Netscape, this problem could cause a table and each and everything would be after it in the HTML in order to simply disappear. IE did not mind the missing of the table tag and it would also display the page. Most of the designers who all did this would not test in the Netscape and would not know what the problem is for about long periods.
Why do you want to bother with the valid HTML?
While almost all the browsers will try to attempt the HTML even if the errors are there, so there are few good reasons in order to validate the HTML.
The HTML might display and it might display entirely different than if it was written correctly.
The errors that occur will compound each other.
Most of the browsers are really forgiving.
The invalid HTML especially if it is been deprecated then it might be supported by the browsers
Therefore, it will be good if you test your WebPages in the Web browser but by validating the HTML and CSS will surely help you to make that stand the test of new browsers and time as well.