Development

How and Why to Use an HTML Validator

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.

Scott S. Bateman

Share
Published by
Scott S. Bateman
Tags: Tools

Recent Posts

How to Create a Google Ads Strategy for Beginners

A Google Ads strategy for beginners begins with defining a few simple goals. Knowing these…

3 years ago

Google Ad Strategy Delivers Efficient Pay Per Click

A Google ad strategy is an inexpensive, efficient and highly educational way of driving targeted…

3 years ago

Tackle Analytics Bounce Rate 1 Page at a Time

The analytics bounce rate is an excellent way to measure the quality of a website…

3 years ago

How Keyword Density Impacts Search Engine Optimization

Keyword density is an SEO tactic that suggests how many times a particular keyword should…

3 years ago

Forum Link Building Offers Modest Benefits for SEO

Forum link building is a marketing tactic that has some moderate benefits with search engine…

3 years ago

New Versus Returning Visitors Reflect Brand Strength

Website publishers who track new versus returning visitors will find new ways to increase site…

3 years ago