HTML and CSS Reference
The W3C has a free Markup Validation Service available at http://validator.w3.org/ that
will validate your XHTML code and check it for syntax errors. XHTML validation
provides students with quick self-assessment—you can prove that your code uses cor-
rect syntax. In the working world, XHTML validation serves as a quality assurance
tool. Invalid code may cause browsers to render the pages slower than otherwise.
HANDS-ON PRACTICE 2.11
In this Hands-On Practice you will use the W3C Markup Validation Service to validate
a Web page. This example uses the design.html page completed in Hands-On Practice
2.8 (student files Chapter2/design.html). Locate design.html and open it in Notepad. We
will add an error to the design.html page. Delete the first closing </li> tag. This modi-
fication should generate several error messages. The first error message will be a direct
result of the incorrect syntax.
Next, attempt to validate the design.html file. Launch a browser and visit the W3C
Markup Validation Service file upload page at http://validator.w3.org/#validate_by_upload.
Click the Browse button and select the Chapter2/design.html file from your computer.
Select More Options. Verify that the check boxes next to Show Source and Verbose
Output are checked, as shown in Figure 2.22. Click the Check button to upload the file
to the W3C site.
Validate your page