question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XMP tag has been deprecated since HTML3.2

See original GitHub issue

I 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 &gt; and &lt. 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 '&lt;' 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:open
  • Created 9 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

1reaction
mookid8000commented, Oct 31, 2018

<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.

0reactions
jbenner-radhamcommented, Jun 22, 2018

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">.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found