Posted By Kenny McHoes, March 2, 2011

valid htmlAn important step in creating a website is to make sure you are writing valid code. When you take the time to write valid code, you ensure your website will function properly for anyone who may visit. A great way to check if your website code is proper, is to validate.

Validating your website is a process that will ensure your pages conform to the web standards set by The World Wide Web Consortium (W3C). There are many website validators online that can be found from a quick Google search that will help out any designer. Below I will discuss the main reasons why validating your website is an essential process in website design.

Cross Browser Compatibility

Cross browser compatibility is the bane of a web designer’s existence, especially nowadays when new browsers are becoming more popular. Although a designer may be able to create a beautiful website that works wonderfully in their favorite web browser, the same results may not occur when viewing through a different one. A webpage may have some errors and it will still function great when viewing through Firefox; however, other browsers such as Internet Explorer or Safari may not be so lenient on those errors and they may break your beautiful design.

When you validate a website’s code (HTML, CSS, XHTML, and more), the validator will scan your pages and check to see if there are any errors or invalid code. If any errors or warnings are found, it will point out where your mistakes are located, and sometimes offer fixes or recommendations. These errors can then be fixed and you can revalidate. Since most browser developers try to conform to W3C Standards, once your code passes validation you are good to go. Your website should load the same on all browsers/platforms.

Search Engine Visibility – SEO

When a webpage has errors, a browser will try different methods to display the page corectly. It may just ignore the broken code or omit it entirely. Search engines use this same method. When search engines such as Google and others scan through your website, they will also have to attempt to interpret your errors. Sometimes they may be able to determine what the developer was trying to accomplish, and other times they may just skip past the entire block of code and omit the results. This can result small parts or entire pages that the search engines miss. When a company is depending their info being indexed by popular search engines, small errors can result on that info never being found.

The best way to make sure all your content will be found by Google, Bing, Yahoo, and others, Is to properly validate your website and strike out any errors before you upload to your server.

Future Visibility

Ensuring your website will run correctly for the future is another big reason to validate your website. Sometimes certain html tags and attributes become deprecated (retired) and are superseded by newer alternatives. When you validate a webpage, if you have used any depreciated or soon to be depreciated tags, you will be warned. You will then be able to substitute the proper code accordingly. If you do not validate and leave the code in, in the future when those tags are retired, parts of your website may break, causing you to desperately rush fix all the errors on your website before anyone notices.

As mentioned before, most browser developers try to abide by the W3C Standards, so when a tag becomes depreciated, your code may or may not work correctly in future versions of the browsers.

How often should you validate

My opinion on this matter is that you should validate every new page you create for your website. Although you may have a sweet template that you previously validated and you use it to make new pages. Any new code you add may have errors. Unless you’re a meticulous person, you may miss these errors. My rule of thumb is, if you make a new page validate, if you add to a page validate, if you make any changes validate, and so on. It’s always better to be safe than sorry.

Tags: , , , ,

Comments are closed.



Subscribe to RSS


Valid XHTML 1.0 Strict   Valid CSS!