Приглашаем посетить
Чулков (chulkov.lit-info.ru)

Validating Your Pages

Previous Page
Table of Contents
Next Page

Validating Your Pages

I'm going to break tradition and recommend something that few web designers currently bother doing: I'm going to suggest that you validate all of your web pages. Few web designers bother with validation because we're still in the early stages of the rebirth of the Web as a more structured web of consistent pages, as opposed to a cobbled-together jungle of hacked code. It's one thing to design and draw a beautiful set of house plans, but it's quite another for an architect to stamp it as a safe structure suitable for construction. Validating your web pages is a similar process, except in this case the architect is an application instead of a person.

Validation is the process of running your pages through a special application that searches for errors and makes sure that your pages follow the strict XHTML standard.

The good news about web page validation is that it's very easy to do. In fact, the standards body responsible for developing web standards, the World Wide Web Consortium, or W3C for short, offers an online validation tool you can use. Follow this URL to try validating a page: http://validator.w3.org/. The W3C Markup Validation Service is shown in Figure 2.4.

Figure 2.4. The W3C Markup Validation Service allows you to validate an HTML (XHTML) document to ensure that it has been coded accurately.

Validating Your Pages


If you've already published a page online, you can use the Validate by URL option. Otherwise, use the Validate by File Upload option because it allows you to validate files stored on your local computer file system. Just click the Browse button, browse to the file, and then click the Check button. If all goes well, your page will get a passing report as shown in Figure 2.5.

Figure 2.5. If a page passes the W3C Markup Validation Service, you know it is ready for prime time.

Validating Your Pages


If the W3C Markup Validation Service encounters an error in your web page, it will provide specific details including the line numbers of the offending code. This is a great way to hunt down problems and rid your pages of buggy code. So not only does document validation allow you to know whether your pages are constructed properly, but it also assists you in finding and fixing problems before you post pages for the world to see.

Did you Know?

Some web development tools include built-in validation features you can use in lieu of the W3C Markup Validation Service.



Previous Page
Table of Contents
Next Page