This introduction should send you well on your way.
XHTML is basically HTML's strict father. (If I may use that analogy)
First things first put the following at the very top of your html document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Note if you use frames you'll have to change that. See my resources for more information.
Then turn your html tag into this:
<html xmlns="http://www.w3.org/1999/xhtml">
Then add this line in the head of your document:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
All tags that dont have a end tag such as:
<link rel="StyleSheet" type="text/css"...> <img src="img.jpg" alt="my image"> <br>
Must be 'ended' with a trailing slash at the end like so:
<link rel="stylesheet" type="text/css" .. /> <img src="img.jpg" alt="my image" /> <br />
You must use quotes now to define all tag attributes no more width=300 it must be width="300"; no more align=center it must be align="center".
All img tags must have a alt attribute.
No more font tags, bold tags, italic tags, strikethrough tags. Basically anything that has to do with the 'look' of your site must now be defined in the styles tag in the head of your document or in a external CSS sheet.
TIP: Learn to use CSS class's and id's often as you'll probably use them for table backgrounds, color and alignment of text, font-controls, etc.
So once you've closed all your tags, took all those font and other non-needed tags out, upload it to your webhost and use this page Markup Validator to see if your page passes or not. If not fix the issues they tell you about and try again.
Although a little frustrating at first XHTML is a snap once you get all the little problems worked through.
Example of a extremely simple XHTML compliant page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My First XHTML Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div align="center"> <h2>My First XHML Page!</h2> </div> <p> This is some content text and such.<br /> This is a XHTML compliant document. </p> </body> </html>
I hope this helps everyone on their way to XHTML compliance.
Resources:
For more information read: W3C's XHTML 1.0
Note: The information I have provided is from my experience with XHTML 1.0 Strict rules. I presented the examples in transitional to make it a bit easier.