« Previous Chapter Next Chapter �

Converting To XHTML

To convert a Web site from HTML to XHTML, you should be familiar with the XHTML syntax rules of the previous chapters. The Below steps were executed (in the order listed below):


Add DOCTYPE to the first line of every page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Hint: Your pages must have a DOCTYPE declaration if you want them to validate as correct XHTML.

Lowercase Tags And Attribute Names

Replace all uppercase tags with lowercase tags and attribute names.

All Attribute Values Were Quoted

quoted every attribute values

Empty Tags: <hr> , <br> and <img>

Empty tags are not allowed in XHTML. The <hr> and <br> tags should be replaced with <hr /> and <br />.

Do a general "find-and-replace" function to swap the tags.

IMPORTANT Compatibility Note:

To make your XHTML compatible, you should add an extra space before the "/" symbol.

« Previous Chapter Next Chapter �

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!