Promise Media

How and Why to Use an HTML Validator

Stored in Development and tagged

An HTML validator such as W3C is an excellent way to check for code errors that develop on a website over time.

Code errors are the inevitable result of ongoing site development efforts with navigation, layout, display and other changes. Some of these errors aren’t even the responsibility of the website publisher. Instead, they may come from third party players.

Serious code errors may get in the way of response times for websites and impact the Core Web Vitals that Google uses as a search algorithm. It is a fact that slow response times impact search engine optimization and search engine rankings.

For these reasons, website publishers should consider running an HTML checker such as W3C on a periodic basis such as monthly or at least yearly.

But some “code errors” in a report from the W3C validator are not only not possible to change but sometimes even not worth the effort. One common example is how W3C responds negatively to Google AdSense code.

HTML Validator Tips

Enter the address of the website in the W3C validator and click on Validate to search the results. Don’t be surprised to see a long list of errors and warnings.

Errors often break down into three broad groups depending on the type of website. Sites that run advertising such as Google AdSense will see quite a few errors from the ads. Usually, the only error worth changing is any javascript code on the page that begins with just <script> instead of <script type=”javascript”>. It’s an easy change to make.

Otherwise, ignore all of the other advertising-related errors because most of them are under the control of the advertising provider and not the publisher.

The second group often consists of errors from the content management system. For example, this site runs on WordPress. The validator shows many errors that are the result of either the core WordPress software or the javascripts and related code from plugins. Again, these errors are outside of the control of the website publisher.

The third group is the most important set of errors because they are within the control of the publisher. Some of the errors are minor, easy to fix and have little impact on website performance. Any big errors should set off alarm bells and lead to immediate solutions. These errors include misplaced div tags for CSS, missing tags, etc., that may impact how pages appear on certain browsers.

Publishers should not worry about achieving a 100 percent error-free report from the W3C validator because it is nearly impossible to get one, especially for complex sites. But they should commit to a regular review just in case a nasty error sneaks into the site by accident.

Fifteen minutes a month reviewing the HTML checker report and making tweaks to code just might lead to better search engine rankings or better user experience.

Make a Comment, Ask a Question

© 2007-2024 Promise Media LLC • AdvertisePrivacyTerms of ServiceSitemap