Introduction to XHTML

Introduction to XHTML

XHTML is the next generation of HTML and is a hybrid between HTML and XML. XML was designed to describe data. HTML was designed to display data. XHTML is much stricter than HTML. Not all browers support XML so XHTML provides an intermediary soluton and can be interpreted by XML and HTML browsers.
What is an XHTML File?
• XHTML stands for EXtensible HyperText Markup Language
• XHTML is similar to HTML,The only difference is XHTML is stricter and cleaner version of HTML
• An XHTML file contains small mark up tags
• The way how the page must be displayed in the browser is described by these markup tags
• An XHTML file must have an .xhtml file extension
• Using any simple text editor XHTML file can be created

Working with XHTML
XHTML stands for eXtensible HyperText Markup Language which is simply HTML 4.0 ,written as an XML application, and it makes manipulating HTML possible in the same way as you would work with XML.

Way from HTML to XHTML-MP 1.0
HTML 4 -> XHTML 1.0 -> XHTML Basic -> XHTML Mobile Profile
As the world was going crazy about XML, Most popular mark-up also could not escape its destiny: XHTML 1.0 is just a reformulation of HTML 4 in XML. HTML 4 simply has to follow few syntatic rules to be XHTML 1.0
• All tags should be written using small letters
• All tags needs to be closed either like this way(bold text) or need to be closed like (/).Here Single line breaks () are not entertained and are not synctactically correct

• All documents should have a document type defination
• All documents should be properly formed
• Shortning of Attributes is not allowed
• There must be a proper nesting of tags

How GOOD and how BAD is XHTML?

The two main uses are “extensibility and portability” and it is standard too.
• Extensibility:As XHTML is extesible, We can create and add on our own tags
• Portability: All new tags that are created and added are understood by all.
• Standardization: Unlike HTML, XHTML follows certain standards to make a true template. And all that has to be accepted and what not should be accepted is followed in that template.
On the other side of the coin,there are couple of problems.

• XHTML is not as easy as HTML to play in just a day. HTML is like a toy that everyone can play with.But people may loose interest to play with such rigid rules of XHTML. Still we cap play with HTML as we used to do before.The XHTML DTD contains HTML. Only thing is you should use an HTML declaration statement at the top of the document.
• For that reason XHTML, and XML go against the rules which were laid down by W3C for the purpose of web content and authoring tools accessible to disabled users.