If someone just says that this is the high time when you should convert your site from HTML to XHTML - you can halt or not. But if he can say this with proper logic then you must be going through his decision - adaptibility is another thing. So at first you must know basically what XHTML is. XHTML is really more similar to HTML than it is different. The "changes" aren't really changes, but just a set of stricter standards to obey. XHTML stands for Extensible HyperText Markup Language. XHTML is a cross between HTML and XML. Any XHTML document will be valid HTML and valid XML, which means it can be opened in any XML editor.
Why the need for XHTML?
- XML allows the developer to add new tags whenever they want, allowing for more flexibility and creativity.
- XHTML can be mixed with XML to provide easy updatable websites.
- New ways of accessing the Internet are being created every day. XML/XHTML is a common standard for all these browsers/clients, which stops different standards being created for each of these methods.
- XHTML is going to replace HTML in the near future so it will be useful if you already use it, as you will have one over on everyone who has stuck to using HTML.
New Doctype Declaration
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/">
And the tag becomes:
<html xmlns="http://www.w3.org/1999/" xml:lang="en" lang="en">
Just Some Rules
1. In the <head> tag the <title>Title here</title> tag must be first, nothing else
2. All tags must be lowercase, so no <TITLE> it must be <title>.
3. Any tag that doesn't have an ending tag, like <br>, must have a space and forward slash before the end like this: <br />.
4. All tag attributes must be surrounded by quotes, so replace <p align=center> with <p align="center">.
5. No attribute can have no value, so, for example, when using the <input> tag with checked at the end, you must change it to checked="checked".
6. All XHTML documents have to be well formed, so each file must have a html, head, title and body set of tags.
7. All documents must have a doctype, see above to find out the best one to use when you are new to XHTML.








