Saturday, May 8, 2010

XHTML - stricter & cleaner

XHTML

Stands for Extensible Hypertext Markup Language.It is combination of html & xml. We can say it is stricter & cleaner version of html. It is W3C recommendation. All browsers support xhtml.

Why XHTML
There are wide range of browsers available in market. Some browsers runs on computer, some on small devices like pda, moblie phones. These small devices do not have the power to interpret bad markup language. If you write a web page in xhtml it is ensure that it runs in all browsers. So go for xhtml insead of old html.

Difference between html & xhtml

* XHTML elements must be properly nested
* XHTML elements must always be closed
* XHTML elements must be in lowercase
* XHTML documents must have one root element

* Attribute names must be in lower case
* Attribute values must be quoted
* Attribute minimization is forbidden
* The id attribute replaces the name attribute
* The XHTML DTD defines mandatory elements



No comments:

Post a Comment