DEVFYI - Developer Resource - FYI

How is XHTML better than HTML? Why would you want to use XHTML?

XHTML Interview Questions and Answers


(Continued from previous question...)

4. How is XHTML better than HTML? Why would you want to use XHTML?

* to be able to take advantage of new coding techniques
* problems with the earlier versions have been fixed.

XHTML is a fairly close copy of HTML 4.01.

Extensibility : Under HTML, the addition of a new group of elements requires alteration of the entire DTD. XML greatly eases the integration of new element collections as it is a subset of SGML itself and specifies it's own DTD.
Portability : By the year 2002 as much as 75% of Internet access could be carried out on non-PC platforms such as palm computers, televisions, fridges, automobiles, telephones, etc. In most cases these devices will not have the computing power of a desktop computer, and will not be designed to accommodate ill-formed HTML as do current browsers.
Currently, the Netscape browser helps greatly for testing web pages by displaying blank or broken pages when it comes across sloppy coding. IE is the most forgiving browser and will show almost any page no matter the extent of coding errors.
While HTML itself isn't completely lacking in extensibility or portability but the evolution of it has been extremely slow compared to the pace of Internet development. This fuels the problems encountered trying to make your pages work on a wide range of browsers and platforms. XHTML will help to remedy those problems.

(Continued on next question...)

Other Interview Questions