ptg16476052
Standards Compliance and the Mobile Web 579
21
browser, but verifying that they’re valid is another matter. Fortunately, the W3C, which
is responsible for managing the HTML recommendations , also provides a service to
validate your pages. It’s a web application that enables you to upload an HTML file
or to validate a specific URL to any W3C recommendation. The URL is http://
validator.w3.org/.
Figure 21.1 is a screenshot of the validator in action. I’ve sent it off to validate https://
http://www.pearson.com/.
When I validate the page, I can see that there are ten messages from the validator: two
info messages, four warnings, and four errors. The first two messages tell me about how
the validator is working. I learn that it used the HTML parser because it detected the
page was in HTML. Then I learned that it was using the schema for HTML with support
for a few other languages like MathML and SVG. The warnings are messages that indi-
cate lines in your code that you should be aware of. They are not saying that your code
is wrong or that you should rewrite it, but rather that you might be using an unnecessary
attribute or something similar.
The messages you want to pay attention to are the errors. Figure 21.2 shows the sixth
message, an error, on the Pearson site validation.
FIGURE 21.1
The W3C Validator
validating
Pearson.com.