Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

7. Moving to XHTML: Putting an ‘X’ into ... > Validation: it’s not just for HTML

Validation: it’s not just for HTML

After Chapter 6, you’re an expert at using the W3C validator, and you’ll find the validator is up to date and ready to validate your XHTML. You do that in exactly the same way that you validated HTML.

image with no caption
image with no caption

There are no Dumb Questions

Q:

Q: How does the validator know whether I’m validating HTML or XHTML? After all, this is the same page I used for HTML.

A:

A: The validator looks at your DOCTYPE declaration, which states that the document is either XHTML Transitional or XHTML Strict, and that’s what it bases its validation on.

image with no caption

Exercise

You didn’t think we’d let you off the hook without validating your XHTML did you? Validate the “lounge.html” file in the “chapter7/lounge” folder, and the “journal.html” file in the “chapter7/journal/” folder (the one you turned into XHTML a couple of pages ago) at the W3C. If you see any errors, check your typing, get them fixed, and try again.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial