XHTML: Converting HTML to XHTML


There may be broken links in this article, the GROK staff has been notified and is working to resolve the issue.
This article has not been updated recently and may contain dated material.



If you want to make your Website accessible to more people, you can convert the site from HTML code to XHTML. There are a few steps involved with this process:

To Covert a Site from HTML to XHTML:

1. You must add a DOCTYPE definition to the top of every page of code. Each document must have the DOCTYPE declaration in order for the site to be validated.

2. All tags and attributes must be lowercase.

3. All attribute values must have quotation marks around them. The attribute value is the part of the attribute in the syntax that comes after the equal sign in most cases.

Example of an attribute


NOTE: In the example above, 100% is the attribute value, and it is correctly in quotation marks.

4. You must close empty tags from the HTML. The image and line break tags are often not closed in HTML.

5. Have the web site validated. A validator can be found by typing "Web site validator" into any search engine. The validator will make sure the XHTML code is correct.

NOTE: You could also use an HTML converter to convert the code automatically instead of going through the first four steps.


 

6900
2/7/2018 11:45:23 AM