XHTML: Converting HTML to XHTML

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 Convert 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 which says table width

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.


8/16/2023 1:26:33 PM