-1

I've been asked in interview, what is the difference between HTML, DHTML and XHTML?

Can anyone please tell me what are the main differences with small example and why the XHTML and DHTML is faster than HTML?

Pedram
  • 6,256
  • 10
  • 65
  • 87
  • 1
    If the interview question really is "why is DHTML faster than HTML", the only correct answer is to tell them they are misinformed. Be tactful about it though. – Mr Lister Dec 18 '15 at 12:59

2 Answers2

2

HTML is a markup language for describing the structure and semantics of text and its relationships to other documents.

DHTML is a term given to "HTML with some JavaScript" which was briefly popular in the late 1990s. It isn't faster than HTML.

XHTML is HTML expressed in XML. It is of little practical value. In theory, the simpler nature of XML combined with rules forbidding certain kinds of error handling mean that an XHTML parser could be faster than an HTML one. In practise this isn't that case because since real XHTML (rather than HTML with an XHTML DOCTYPE) was never all that popular, no major browser vendor actually optimised their XHTML parsers that much.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
1
  • HTML is the markup language which is used to create websites.
  • DHTML is the technique to manipulate the DOM-Tree (the object model which the browser generates from your HTML markup) via JavaScript while the User interacts with the webpage. The term is pretty deprected in my opinion
  • XHTML is based on XML and follows all rules of XML (HTML doesn't) but has the same purpose as HTML. It is also extensible.

Nothing of those has anything relevant to do with performance (like saying DHTML is faster then HTML).

phortx
  • 849
  • 5
  • 21