XMP tag has been deprecated since HTML3.2
See original GitHub issueI found this library to be very useful, and one of my colleagues used it to help us build API documentation that didn’t require us to replace all of the >
and <
with >
and <
. In fact, I see it as a competitor to static-site generator tools like Jekyll, Octopress, and DocPad. In fact, that’s exactly what we did with our API documentation. we used Strapdown.js to create a static page.
However, it recently came to my attention that <xmp
has been deprecated since HTML3.2.
Should you consider using a non-deprecated tag in this library, such as <pre>
or <code>
as suggested by the Mozilla HTML documentation on XMP?
Note: Do not use this element.
- 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.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
<xmp> - HTML: HyperText Markup Language - MDN Web Docs
It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from current HTML. Use the...
Read more ><xmp> - HTML: Hypertext Markup Language
It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from the language in HTML5....
Read more >Why was the xmp HTML tag deprecated? - Stack Overflow
2. It is marked as deprecated in HTML 3.2. · 1. But the same reasons behind xml processing have already been there. ·...
Read more >web - html - element - xmp - index.md - GitHub
It has been deprecated since HTML3.2 and was not implemented in a consistent way. It was completely removed from current HTML.
Read more >Xmp - HTML - W3cubDocs
The <xmp> HTML element renders text between the start and end tags ... It has been deprecated since HTML3.2 and was not implemented...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
<template>
is meant for HTML code that is not readily rendered by a client, but instead leaves it in the DOM for scripts to manipulate.Since any content is allowed, it’s an obvious candidate as an alternative to the deprecated
<xmp>
tag.That’s a good point. Although it’s not uncommon to see markup in
text/x-template
tags for various template systems like Handlebars, Vue, etc. it’s not the most semantic implementation I agree. The only other thing I could think of would be something like<template class="markdown">
.