HTML and CSS Validation

HTML and CSS Validation Policy

If you are not in web industry, you may not realise when and why you need HTML validation and CSS validation.

What does Validating HTML or CSS Mean?

Validating HTML or CSS basically refers to using a program or an online service to check that the web page that you created is free of errors. In particular, an HTML validator checks to make sure the HTML code on your web page complies with the standards set by the W3 Consortium (the organisation that issues the HTML standards). There are various types of validators — some check only for errors, others also make suggestions about your code, telling you when a certain way of writing things might lead to unexpected results.

A CSS validator checks your Cascading Style Sheets in the same manner; basically, most will check them to make sure that they comply with the CSS standards set by the W3 Consortium. There are a few which will also tell you which CSS features are supported by which browsers.

There are numerous other validators around, both free and commercial, focusing on various aspects of ensuring that your code will run trouble-free across browsers and platforms.

Note that validating your web page does not ensure that it will appear as you want in various browsers. It merely ensures that your code is without HTML or CSS syntax errors. Ensuring that your code appears correctly in different browsers require cross browser testing.

Why Validate Your HTML Code?

HTML and CSS validation – reasons why you should validate your code:

  • SEARCH ENGINES – If you want your site listed on search engines then make sure that you have good HTML. Many engines cannot properly and efficiently catalog or index a site that has serious HTML errors. This can greatly reduce the amount of traffic your website receives from search engines.
  • BETTER, FASTER RENDERING – Properly written HTML will render better, render on more browsers, and render faster than HTML with errors. It’s also more easily adapted to print and alternative browsing devices like mobile phones and other handheld computer devices.
  • A CONSISTENT DOCUMENT OBJECT MODEL – Bad HTML may cause different browsers to generate different DOMs. This can cause CSS to render differently and make it more difficult to write JavaScript that works properly on different browsers.
  • FUTURE-PROOF – Properly written HTML is more likely to be future-proof (backward compatible with future standards and future web browsers).
  • IT WON’T BE YOUR FAULT – If you build your site based on standards and good HTML & CSS, then it won’t be your fault if your site doesn’t work with a particular browser.
  • LINKS THAT WORK – Broken links can quickly drive visitors away. How many times have you been annoyed when you found a broken link?
  • AVOID UGLY PAGES – Problems such as “ugly” pages caused by poor HTML constantly drive visitors away from web sites. Do you want your web site to be one that customers will leave because of poor quality?
  • THINK IT’S ALREADY GOOD? – If you think that your HTML is good the way it is and that you don’t need to check it, then let CSE HTML Validator check your HTML to prove that you’re right. Chances are that you’ll be surprised and that your HTML has room for improvement.
  • BE STANDARDS COMPLIANT – Browsers are becoming more standards compliant, and it is becoming increasingly necessary and important to write valid and standards compliant HTML. CSE HTML Validator will help alert you to HTML that is not standards compliant and that may cause viewing problems for visitors.
  • BEWARE OF WYSIWYG EDITORS – A WYSIWYG editor is no excuse for not producing good HTML. If a WYSIWYG editor does not produce good HTML, then it should not be used or its output should be fixed manually. Newer WYSIWYG editors are better but many still have problems writing correct HTML.
  • HAVE DYNAMIC PAGES? – Having a site with dynamic pages is also no excuse for bad HTML. CSE HTML Validator lets you easily check the HTML output of your dynamic pages. If the dynamic pages are outputting HTML that is full of errors, then the pages should be fixed.
  • BETTER RENDERING – Writing error-free HTML is the best way to help ensure that pages render optimally in as many browsers as possible. This includes older browsers and browsers that are yet to be developed.
  • WRITE IT ONCE – Write it right the first time and write it once. Write it wrong, and you may be writing it again later.
  • Mobile Devices

    Mobile devices have become very popular, and many people may be viewing your website on a mobile device. Any HTML or CSS problems could be especially harmful for viewers using browsers on mobile devices, so this is another reason to validate your web documents.

    How Often Should I Validate?

    Some people validate every time they make a modification to their pages on the grounds that careless mistakes can occur any time. Others validate only when they make a major design change.
    We always validate the template for our pages when we make a major design change. We try to validate our pages each time we made modifications.


    Validating your HTML and CSS code for standards compliance has certain benefits: it protects your pages from problems arising from syntax errors in your code due to different ways of interpreting errors by the search engines and other browsers. If, however, you have a large number of existing pages that have not been validated and corrected, but nonetheless work well in search engines and other browsers, you might need to consider some sort of strategy to prevent webmaster-overload.

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677