CSS Validation

CSS validation is the process of checking the code against the formal guidelines and standards set by the Wide Web Consortium (W3C) for CSS document.

There are several specific reasons for validating a website, some of them are:

  • It helps to create Web pages that are cross-browser, cross-platform compatible. It also likely to be compatible with the future version of Web browsers and Web standards.
  • Standards compliant web pages increase the search engines spider visibility and your pages will more likely be appear in search results.
  • It will reduce unexpected errors and make your web pages more accessible to the visitor of your website.

We can validate our site using w3c validator(https://jigsaw.w3.org/css-validator/) . This site has option to validate by uploading file or using direct url.

Generally this site has below error:-

  • Block level element will never be a child of inline level element
  • Images must have alt attribute for description and helping user to understand about the image
  • Will highlight deprecated tags
  • Anchor tag must have title attribute to explain about the purpose of that link

We should keep in mind these points while developing any of the application. There are other types of error as well, you will understand it better when you develop a site by your own and then visit this site for error and warnings.

Note:- Validation is important as it always ensure that our web pages are interpreted in the same way (the way you want it) by the various web browsers, search engines etc. as well as users and visitors of your Web site.