Validating Your Theme
Validating the markup of your theme is the process of ensuring that the web pages conform to web standards defined by various organizations. These standards ensure web pages are interpreted in the same way by different browsers, search engines, and other web clients.
Conforming to standards and regulations is one of many ways you can make your theme universally understood. Make sure your code and styles validate across the board. That means they have to meet the standards set by the W3C Organization and pass a variety of validations for CSS and XHTML.
Not all validators check for the same things. Some only check CSS, others XHTML, and others for accessibility. If you are sincere in presenting standardized pages to the public, test them with several validators. The World Wide Web Consortium sets the standards and also hosts a variety of web page validators.
Validating your WordPress site means more than just checking the front page for errors. A theme’s template files are loaded in a modular fashion. While you may fix all the errors associated with the
sidebar.php on your front page, errors may still exist within other template files such as
category.php. Validate pages that load each of your theme template files.
To help you validate your WordPress site, here is a quick checklist:
- Validate your HTML / CSS / Feeds
- Validate accessibility – WCAG Guidelines, Section 508 Standards and WAI standards
- Check different browsers
- Re-validate HTML and CSS
- W3C.org’s CSS Validator (URL, upload, and direct paste in)