I saw this table :
when I program Asp.net and want to display these special html entities , I use Entity Name.
(but both seems to work)
question :
in what scenarios should I use entity number ( and not entity name ) ?
p.s. Ive seen situation in which asp.net doesnt like Entity Number
There is not clear guidance as to when one should use a numeric character reference (say £
) over a character entity reference (say £
) or vice versa.
So long as a character entity reference is a defined one (you can define your own), you can use it.
The converse is that if it isn't defined, you should use a numeric character reference.
There is no need to use either of them for most characters. Just enter the characters, in UTF-8, or in ISO-8859-1, whichever you are using. If you don’t know how to type a no-break space, for example, and don’t want to learn it, the entity reference
and the character reference  
are equivalent, so use whichever you find less confusing. (The latter is not an entity reference, so “Entity Number” is a misnomer.)
Only for “<” and for “&”, when used as data characters, will you need “escape” notations, and for them, I cannot figure out any reason why you would use character references, instead of the reasonably mnemonic entity references <
and &
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With