Compare/contrast HTML, XHTML, XML, and HTML5

2020-02-07 18:00发布

Ok, so I'm not quite sure the difference between these languages. Could someone clarify? I know that XML has user-defined tag and html is pre-defined, but thats basically the extent of my knowledge.

I know that HTML5 is supposed to replace HTML, but wasn't XML supposed to do that as well? Basically, which languages here are a substitute for the other, and which complement? Does XML replace XHTML?

标签: xml xhtml html
9条回答
走好不送
2楼-- · 2020-02-07 18:25

See for the graphic for the two serializations of HTML5 Abstract language. alt text

查看更多
够拽才男人
3楼-- · 2020-02-07 18:25

HTML is a markup language for web pages, while XML is a markup language for information. XML was never meant as a direct replacement for HTML, it has a different scope.

HTML 5 is just the latest version of HTML. The "current" version of HTML (the one supported by practically all browsers in use) is 4.01.

XHTML is a standard based on HTML that has been adjusted to conform to the stricter rules of XML. An XHTML document is also an XML document and if it's correctly written it can be parsed by any XML parser.

查看更多
Animai°情兽
4楼-- · 2020-02-07 18:30

HTML is a markup language made for Web pages. HTML 5 is the fifth version of HTML.

XML is another markup language. XHTML is a dialect of XML that closely resembles HTML and was meant to replace it, but due to poor support has basically just existed alongside HTML.

查看更多
登录 后发表回答