How to convert the existing structure to XHTML
What DOCTYPE should we choose? The ideal situation is of course a Strict DTD, but for most of our designers who are new to web standards, the Transitional DTD (XHTML 1.0 Transitional) is currently an ideal choice (including this site, is also a transitional DTD ). Because this DTD also allows us to use the identifier, element, and attribute of the presentation layer, it is easier to pass W3C code verification.
From the current HTML to XHTML, pay attention to the following points:
1. Add a description of the document type to the header of each page. For example:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Of course, you can select another type.
2. The tag and name must be in lower case.
You can write a replacement program to replace all the tags in your HTML document with lowercase letters, and change the name attribute to lowercase letters.
3. All attribute values must be enclosed in quotation marks.
4. Separate labels, such as
5. Open the W3C DTD official website: http://validator.w3.org/check/referer. during verification, a general error may indicate that your label is embedded. You can also use tidy, a conversion tool provided by the official website to achieve conversion: Workshop.
6. Open the following page and enter the URL to verify our program: http: // js/standard.htm.