Code Validation - Clean Code

What is Code Validation?

Code validation is the process of checking that the coding of a web page is in compliance with the standards and recommendations set by the World Wide Web Consortium (W3C) for the web. Code validation helps to produce clean code.

Web page HTML (Hyper Text Markup Language), Cascading Style Sheets (CSS), hyperlinks (also know as links) and accessibility can be validated.

Code validation is done through the use of HTML validators, Cascading Style Sheet validators, link checkers and accessibility validators available on the Net or as downloadable software. Each type of validator will be covered in this article and the resulting benefits of clean code explained.

Why Validate Your Code?

Why Code Validation - Clean Code is Important

There is a whole planning process when designing a website which includes evaluating the audience's needs, capabilities (net savvy or not) and products and machines they have among other things.

Code validation helps eliminate problems (such as incorrect html document structure) so there is a better chance of the website being viewed by all on the Net as intended. The W3C has set standards that the browser programmers are to follow. Some browser are not fully compliant but if you validate the website code, basic coding errors will be eliminated that will cause problems when displaying the web page and result in a web page with clean code.

If you validate your code it wil make it easier for:

When using free coding and scripts found on the Net make sure that you select ones that are Cross-Browser Compatible and validate. Some of the free coding and scripts available on the Net do not validate because the creator has not implimented clean compliant coding techniques.

If you include affiliate links or reference a map at somewhere like MapQuest your page may not validate due to the coding you were given. If you are a beginner I would suggest that you leave the coding as it is and just get the rest of your page to validate.

So to summarize, Code validation is important for:

  1. Search engine optimization
  2. Accessibility
  3. Cross-browser compatibility
  4. Code clean up
  5. Valid HTML coding

Code Validation from the Accessibility Point of View

Code validation increases the overall accessibility of the website. Alternate browsers for disabled users read all of the coding. If there are errors the browser will not convey your information correctly, a reason that clean code is important. Having clean code and accessible pages (beyond the scope of these tutorials) will help your page be viewable in a number of other devices.

New Web Designers (and the Old Timers) who wish to contract to Federal and State/Provincial agencies have to produce fully accessible sites. Validation gets the website part way there.

Code Validation from a Search Engine Optimization Point of View

Code validation is important to search engine optimization also. Search engines read the page coding from the top down. Having valid clean code will make it easier for the search engine spider to index your page.

HTML code missing quote marks in a tag can be a problem for the spider. Also, errors in coding can hide content from the spider. The page may render as intended but the coding errors stop the spider from reading the content you worked so hard to optimize. Once you validate the page coding these will be found and when corrected will result in clean code that the search engine spider can read and index.

The size of HTML coding and page affects the search engine spider's reaction to your page. The spider reads the HTML coding and text actually contained in the page. Code validation will help find some extra HTML coding that is not necessary. Scripts and features like Flash are not evaluated by the search engine spider. It is much better to have more text than HTML coding. Each search engine spider has an optimal page size so you will have to do some research to determine what would be the best size page (as far as html file size).

Moving formatting of font, images and other presentation styles to an external stylesheet will reduce the HTML coding side of you page size, leaving more room for the important stuff, content and result in a page with clean code.

Code Validation with Code Validators

If you found this web page a useful resource for your own website please link as follows:

HTML Basic Tutor -

Code Validation - Clean Code eliminates problems, creates a website viewable by all on the Net, increases website accessibility and improves search engine optimization.