4 ms·
xmp tag? Never heard of it. MDN to the rescue! Obsolete This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it
by ksherlock 8y ago
xmp tag? Never heard of it. MDN to the rescue!
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
* It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5.
* Use the <pre> element or, if semantically adequate, the <code> element instead. Note that you will need to escape the '<' character as '<' to make sure it is not interpreted as markup.
* A monospaced font can also be obtained on any element, by applying an adequate CSS style using monospace as the generic-font value for the font-family property.
- kjeetgill 8y agoAh thank you for this. I'm not a web guy, so I just assumed the xmp was a made-up tag just for this script to use.
- cyberferret 8y agoI may be totally off track here, but I am thinking that the <xmp> tag is only used for the parser to identify which theme the author wants to use? I am assuming that the end HTML just strips out the xmp tag and inserts the relevant bootstrap CSS/JS links in there to match the theme, so the actual xmp tag is never passed across to the browser?
- WorldMaker 8y agoPresumably it was chosen because it also allows the author to include HTML tags inside Markdown (somewhat common in Markdown usage) with the browser (mostly) ignoring them. It's part of why many other options using <script type='text/markdown'>, though at least in SCRIPT's case it hasn't been deprecated since HTML 3.2.