Ascii character codes shown as text in browser [duplicate]
This question already has an answer here:
I run a website that has HTML tutorials on it. I am familiar with the use of ascii character codes like
> when I am writing HTML tags on my website, but I want to show my users how to write their character codes like this. One of the ones I want to show them is a gap in HTML, represented by
, but whenever I type it on my HTML document it converts to a space, even though it is in the
<code> tags. Is there an alternative that looks the same as
, but doesn't have any functionality? Maybe with CSS or HTML?
< and the like are not ASCII character codes, they're HTML entities.
And to show them, it's quite simple: escape the
& by writing
& instead, so write
&lt; to show