How to Remove Unwanted Formatting from Your Website
How to Set Up an HTML5 Web Page for Offline Cache
How to Set Up a Test Directory for Your Website

How to Validate Your Code Markup in Dreamweaver

No matter what code editor you happen to use for your website, you absolutely must use a built-in or standalone validation tool to check the accuracy of your code.

Most code editors have some kind of feature that allows you to validate code in the currently open file, a series of selected files, or the specified managed site, and you should be able to use this tool to validate a number of different markup languages, including HTML, XHTML, HTML5, JSP, CFML, XML, and WML. If your code editor does not include a code validator, use an online validator.

Over the past several years, Dreamweaver has included a built-in validation tool to help identify coding errors. The Validator tool, however, was deprecated in CS5 but then made a comeback in CS5.5 and CS6 by integrating Dreamweaver with the W3C’s free validator tool. To illustrate how this built-in validator works, the following steps show you how to run Dreamweaver’s Validator on a single open HTML file:

  1. From the Validation tab in the Results panel, click the green arrow button in the upper-left corner and select Validate Current Document.

    Dreamweaver automatically runs the report and displays any problematic results in the bottom part of the Results panel.

  2. To view or correct any of the errors, warnings, or messages listed in the results area, double-click the filename of the error in question.

    Dreamweaver automatically opens the selected document and highlights the line(s) of code that contains the error.

  3. Correct any errors within the HTML code as needed and rerun the report.

    Occasionally, fixing one error can result in another, so it’s always a good idea to rerun the report at least once to ensure that you’ve identified and corrected every error, warning, and message.

When no problems are found in the code, Dreamweaver displays the message No warnings or errors found [DTD].

blog comments powered by Disqus
Troubleshooting JavaScript
How to Clean Up Your Web Code
Web Browser Support for HTML5
How to Generate Web Code Issue Reports in Dreamweaver
Free Tools to Validate HTML and CSS Markup
Advertisement

Inside Dummies.com