While contemporary Web browsers do an increasingly good job of parsing even the worst HTML “tag soup” … different software on different platforms will not handle errors in a similar fashion …
Use valid HTML
Pages should be free of HTML validation errors. Invalid HTML can cause problems to users as pages may not be displayed as you intended. Browsers differ in how they treat invalid code so you should always use valid HTML to avoid browser specific issues. Likewise, search engines trying to interpret invalid HTML may misunderstand the content of a page.
Use valid CSS
CSS files should be free from syntax errors. Invalid CSS can cause pages to be incorrectly displayed which means visitors may not see your content as intended. CSS errors could also impact search rankings as for example Google says pages can be penalized if CSS causes page content to be hidden.
More articles in this series
➜ This article is from our comprehensive SEO Best Practices guide.
➜ Next article in this series: Links
➜ Previous article in this series: URL names