6 ms·
No love for the <plaintext> tag? "The <plaintext> HTML element renders everything following the start tag as raw text, ignoring any following HTML. There is no
by rav 2y ago
No love for the <plaintext> tag? "The <plaintext> HTML element renders everything following the start tag as raw text, ignoring any following HTML. There is no closing tag, since everything after it is considered raw text." - it's my favorite obscure deprecated HTML tag.
- filcuk 2y agoWhat in the world was the intended use for that?
- kisonecat 2y agoI'm terrified of opening a paren andforgetting to close it! How terrifying to find a tagged paren that cannot be closed! "please accept from me this unpretentious bouquet of early-blooming" <plaintext>s
- layer8 2y agoIt was an easy way to use an existing plain-text document where HTML was expected. https://datatracker.ietf.org/doc/html/draft-ietf-html-spec-02.txt#section-14.2.3 https://datatracker.ietf.org/doc/html/draft-ietf-html-spec-0... The PLAINTEXT element was replaced by the LISTING element (which was itself deprecated in HTML 3.2): https://datatracker.ietf.org/doc/html/rfc1866#section-5.5.2.1 https://datatracker.ietf.org/doc/html/rfc1866#section-5.5.2....
- dmsnell 2y agoFun fact: this is very close but slightly inaccurate. I used to think this is how it worked before scrutinizing a rule in the HTML tree-building specification. The tag leads the parser to interpret everything following it as character data, but doesn’t impact rendering. In these cases, if there are active formatting elements that would normally be reconstructed, they will after the PLAINTEXT tag as well. It’s quite unexpected. <a href="https://news.ycombinator.com"><b><i><u><s><plaintext>hi In this example “hi” will render with every one of the preceding formats applied. https://software.hixie.ch/utilities/js/live-dom-viewer/?%3Ca%20href%3D%22https%3A%2F%2Fnews.ycombinator.com%22%3E%3Cb%3E%3Ci%3E%3Cu%3E%3Cs%3E%3Cplaintext%3Ehi https://software.hixie.ch/utilities/js/live-dom-viewer/?%3Ca... After I discovered this the note in the spec was updated to make it clearer. https://html.spec.whatwg.org/multipage/parsing.html#:~:text=A start tag whose tag name is "plaintext"
- soheil 2y agosame as <pre no?
- assimpleaspossi 2y agoIt's not deprecated. It's obsolete and totally removed from the HTML standard since HTML4.