6 ms·
The MDN wiki states that the <plaintext> tag, along with the similar <xmp> and <listing> tags, has been deprecated since the ancient times of HTML 3.2. It also
by barosl 12y ago
The MDN wiki states that the <plaintext> tag, along with the similar <xmp> and <listing> tags, has been deprecated since the ancient times of HTML 3.2. It also says the support for those tags can disappear suddenly in this HTML5 era.
I know the use of <plaintext> seems to be essential for the implementation, but I'm not sure that it is a reliable way. Are there any alternatives?
- kristopolous 12y agoThe only other way I know to break the interpreter is if you force a bad character encoding of a different bit width. I have yet to get it working as reliably across the same wide range of browsers. As far as it disappearing; In order for that to happen one browser group will have to take the first step of intentionally breaking legacy webpages - it seems antithetical to the "render as much as possible" features arm-race nature of the browser world. Then again, I've been wrong plenty of times before.
- user24 12y agoCould a textarea tag work too?
- kristopolous 12y agonot if the document has an existing <textarea> (and thus </textarea>). <plaintext> is rather final ... see here for a demo I just threw together: http://getpostdelete.com/plaintext.html http://getpostdelete.com/plaintext.html The HTML interpreter packs up its bags and goes home - you can't "close" a <plaintext> tag if it's existing in a plain HTML page. However, you can still manipulate it through the DOM.
- user24 12y agoYeah I sort of realised that as I said it. Hmm.