Why was the xmp HTML tag deprecated?

Possible Duplicate:
<XMP> Tag

I know that it is deprecated of course, and I know how to work around it by using the <pre> tag, <code> tag, and escapes for <> .

My question is, why was it depricated? The solution of having real code in an <xmp> tag seems so much more elegant than all this escaping we do now adays, and yet, the one was neglected in favour of the other.

Any idea? Is there a reason for favouring <pre> ; with escapes over <xmp> ?


This article has a detailed decription on the depreciation of xmp .

tl; dr; to remove ambiguity in parsing html.


The most compelling reason for me is that the use of the tag would make it impossible to consider html as a well-formed xml.

That is, the special meaning behind one tag that alters the way the document is processed is a bad precedent making it impossible to account for newer versions. For instance, there's no way you can skip unknown tag with its content if you can't tell when it's over without knowing this particular markup specs.

链接地址: http://www.djcxy.com/p/5158.html

上一篇: 什么是最有效率的/优雅的方式来解析一个平坦的表格到树?

下一篇: 为什么不推荐使用xmp HTML标签?