问题描述
我知道它 是不赞成的当然,我知道如何通过使用< pre>
标记,< code>
标记来解决它,并为<>
转义。
我的问题是,为什么被破坏了?在< xmp>
标签中使用真实代码的解决方案似乎比我们现在所做的所有转义优雅得多,然而,它却被忽略了,另一个。
有什么想法?是否有理由支持< pre>
;在< xmp>
?
详细解释了 xmp
的折旧。
tl;博士;在解析html时消除歧义。
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.
这篇关于为什么不推荐使用xmp HTML标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!