W3C compliance test

What does it do?

Tests whether the website is W3C compliant. W3C are the primary standards body for the web, and have defined a precise specification for how the HTML (or XHTML) of a website should be written to ensure compatibility, accessibility and follow best practice.

Example results

Example W3C compliance test results

Why is it important?

W3C is the standards body for the web, and W3C compliance is therefore a widely adopted test with many benefits. As a general rule, sites which are W3C complaint will work more consistently across web browsers, in particular new ones as they are released. They will also likely be more accessible and usable (though adoption of standards which users will tend to expect, and therefore be familiar with). They are also more likely to work on non-standard devices, such as mobile phones and televisions, which are becoming increasingly prevalent. Some search engines (notably Bing and Google Accessible) have stated they prefer W3C compliant pages.

The principles of validation generally correlates highly with good SEO (Search Engine Optimisation) practice. W3C compliance is considered one of the best assurances that the website has been built with accessibility in mind (which is a legal requirement in many countries). The UK is particularly concerned with W3C compliance.

For more reasons see: this explanation by the W3C.

How is it measured?

The W3C test is run on every single page of the website in turn. The overall score is based on the proportion of pages which contain no errors – a perfect score means 100% of pages are compliant.

Although this test reports W3C Warnings and Errors, only Errors count towards the final score. It is therefore possible for a site to score a perfect 10 and yet report compliance warnings.

Customisation

Some types of site should consider W3C compliance more or less important; generally public sector websites are under greater pressure to be compliant. You can modify how great an effect this test has on the Summary Scores by viewing a report for the website, clicking Site Settings > Test configuration and modifying the setting Importance of W3C compliance. You’ll need to re-test the website afterwards.

If you prefer, you can simply exclude this test entirely.

Technical explanation

The W3C test is extremely complex and defined in detail by the various HTML / XHTML specifications of the W3C.

The results of this test should be functionally identical to those provided by the official W3C Validator.

Potential problems

If you think this test is incorrectly marking a page as invalid, click the View errors link next to the page being reported. This will open the same page in the official W3C validator, which should also show the page is invalid and why.

If the official validator is saying a page is valid, but Sitebeam is saying it is not, the most likely explanation is that Sitebeam is seeing those webpages differently. For example, Sitebeam may be logged into your site, or viewing it from a different geographic location. See what Sitebeam sees for more help.

If you are using cutting edge HTML5 to build your sites, there is a chance that our local copy of the validator has gotten out of sync with the official one.  If you believe this to be the case, please contact us with a link to your report so we can investigate and if needed, update the validator.

Some argue the value of W3C compliance. We advocate compliance wherever possible, however we acknowledge that it is not necessarily a flawless measure of code quality (it is, however, by far the most accepted). Of course you can always exclude this test.

How to improve this score

Address the compliance issues for your website. We suggest you make use of the Export feature if you have a long list of pages to review – this will put the most invalid pages at the top of your list.

Depending on the technology used, whether or not your website uses templates or any form of scripting, compliance may be extremely difficult to obtain. In many cases, the most efficient solution is to rebuild the entire website. Some websites which are usually compliant can suffer when users add content to the website via a Content Management System. Many CMS’s will accept potentially invalid content from a user and thereby compromise the W3C compliance as content is updated.

For some special scenarios, W3C compliance may not be desirable – e.g. when adhering to the standard prohibits use of functionality which is essential for security or usability. An example would be the use of the non-standard autocomplete attribute, which prevents the browser from automatically completing certain fields. This is virtually essential for a secure e-commerce checkout, but not accepted as compliant by W3C.

How to use this test effectively

Wherever possible, use this test to fix and improve the W3C compliance of your websites. For new websites, try to insist that the website is W3C compliant to begin with. It is not easy to fix a large website which has not been designed to be compliant once it is finished.

Was this article helpful? Contact our support team if you have a question.