I run a website that has HTML tutorials on it. I am familiar with the use of ascii character codes like <
and >
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?
Asked
Active
Viewed 378 times
2
-
1possibly dupicate of http://stackoverflow.com/questions/17427713/how-to-write-out-html-entity-name-nbsp-lt-gt-etc – Insomniac Feb 15 '16 at 07:56
3 Answers
2
<
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 <
.

jcaron
- 17,302
- 6
- 32
- 46
0
I believe if you put it in your markup as
&nbsp;
It will give you what you want.

Buddy Yaussy
- 535
- 2
- 7