Validating xhtml code

Conforming to standards and regulations is one of the many ways you can make your website universally understood.Make sure your codes and styles validate across the board.A popular service is the W3C Markup Validation Service, which is maintained by the World Wide Web Consortium.To use this validator, enter the URL of the page that you want the service to check.A typical strategy is to deploy your pages to a publicly available server.The server can be a test server; it does not have to be a production server. You can then use a validation service that can read your pages programmatically.The validation site requests the page and produces a report of any errors that it finds.

If the page that you are checking contains dynamic content, or if users can personalize Web pages in your site, you must be sure to test pages with different content to be sure all possible content in the page is valid. NET Web page to a validation service such as the W3C Markup Validation Service, ASP.

NET recognizes, such as Internet Explorer or Mozilla. NET cannot recognize the browser type, it defaults to rendering downlevel markup, which does not include XHTML-conformant elements and attributes, or features such as cascading style sheet styles.

You can configure your application to send the correct XHTML-conformant markup to the validation service by creating a browser definition for the validation service's user agent string.

In some cases, this can be difficult because the variation in possible page output is too great to be able to test effectively. NET examines information in the request about the current browser, and based on the browser type (user agent string), renders markup that is appropriate for that browser. NET might render a version of the page that does not conform to XHTML standards.

This is because the validator service does not report itself as a browser type that ASP.

Leave a Reply