W3C Compliance


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.

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 Live and Google Accessible) 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.

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, although they are implemented differently, and the two tools may report issue detail differently.

Potential problems

HTML5 pages are marked as invalid. WebScan does not currently validate HTML5. We are adding support for this in the near future - for now we suggest you manually exclude this test.

If you think your pages are valid and that this test is marking them as invalid, bear in mind this test:

  • Displays errors and warnings in results but
  • Only counts errors towards your score

You can compare like-for-like results by filtering the W3C results in WebScan down to a single page, and comparing these with those of the official W3C validator. They should be identical.

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).

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.

Impact on Summary Scores

Summary Score Percentage Penalty
Accessibility Score* 4.7% None
Marketing Score 1.0% None
Overall Score* 2.3% None
Technology Score 6.1% Penalty if below 2.2

* The effect on this Summary Score can vary depending on the customisation options chosen.