To convert a document to XHTML (Extensible Hypertext Markup Language), you will need to follow these steps:
- Make sure the document is well-formed and valid according to the rules of HTML. This means that all tags must be properly nested and closed, and all attributes must be properly quoted.
- Change the document’s doctype to the XHTML doctype, which is:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
-
Replace all HTML tags with their XHTML equivalents. For example, replace
<br>
with<br />
, and replace<img>
with<img />
. -
Make sure all attribute values are enclosed in quotes, for example
<img src="image.jpg" alt="image">
-
Make sure your document starts with the <html> tag and include the xmlns attribute , like this:
<html xmlns=”http://www.w3.org/1999/xhtml”>
-
Ensure that all elements and attributes are in lowercase.
-
Save the document with the “.xhtml” file extension.
Once you have done this, your document should be valid XHTML and should be able to be parsed and rendered by XHTML-compliant browsers and devices.
You can outsource your XHTML conversion to Convert2xhtml.com for a professional conversion.
loading...
loading...
Leave a Reply