How to convert document to XHTML

To convert a document to XHTML (Extensible Hypertext Markup Language), you will need to follow these steps:

  1. 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.
  2. 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”>

  1. Replace all HTML tags with their XHTML equivalents. For example, replace <br> with <br />, and replace <img> with <img />.

  2. Make sure all attribute values are enclosed in quotes, for example <img src="image.jpg" alt="image">

  3. Make sure your document starts with the <html> tag and include the xmlns attribute , like this:

<html xmlns=”http://www.w3.org/1999/xhtml”>

  1. Ensure that all elements and attributes are in lowercase.

  2. 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.

GD Star Rating
loading...
GD Star Rating
loading...
Share this Story

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share a word

Blog Rating

Average blog rating:

9.6

Convert2xhtml.com is an Einfoway Company, with huge 15+ years of experience in Total Web Solutions and having clients around the globe. Name that you can trust.

Email : info @ convert2xhtml.com
Call Us : + 1 704 557 0251
Usa Toll Free : + 1 888 992 7246