HTML: how to insert HTML code in a verbatim tag <pre>

One issue with verbatim tag in HTML (<pre>) is that any HTML code included within the special characters < and > will be interpreted as HTML code despite the usage of a verbatim environment. So, if you include HTML code inside a verbatim, most of the time you just wont see it. To avoid that, the only solution I found right now is to use HTML names that are &gt; and &lt;.

The full list can be found easily on the web. For instance here

Interestingly, I had to use these codes for the title of the this post to render the tag <pre>.

Please follow and like us:
This entry was posted in Internet related and tagged . Bookmark the permalink.

One Response to HTML: how to insert HTML code in a verbatim tag <pre>

Leave a Reply

Your email address will not be published.