Why does invalid HTML work?
Why does invalid HTML work? One of the number one reasons why people don’t validate is because when they test, the page seems to be displaying without a problem. Why is it that Web browsers will display HTML that is technically incorrect? Does that mean that we shouldn’t need to worry about valid or correct HTML (or CSS or JavaScript or PHP, etc.)?Answer: When Web browsers were invented, the programmers recognized that there was a possibility that there would be hundreds if not thousands of people writing HTML and creating Web pages. When this many people (and there are significantly more than that now) are trying to use a programming language or markup language like HTML, it can get very frustrating very quickly if every tiny error results in a broken page. So the Web browser programmers decided that browsers should be forgiving. What this means is that when a Web browser views a Web page, it has the rules for HTML (and CSS and JavaScript) and attempts to interpret them to display you