In HTML, an ampersand and hash together (i.e.
&#) is used to specify an HTML entity with a numeric character code (either in decimal or hexadecimal form). It has the following syntax:
entity_number can be a decimal or hexadecimal number that represents a character's code point in Unicode/UCS. After the entity's numeric code, a semi-colon (
;) follows to mark the end of the HTML entity code.
For example, the Euro symbol (
€) is represented in Unicode as
20AC in hexadecimal and as
8364 in decimal. For HTML to parse and interpret the character correctly, you would write it as an HTML entity like so:
<!-- euro symbol in decimal --> €
<!-- euro symbol in hexadecimal --> €
Please note that hexadecimal characters need to be prefixed with
x (which is just a way of indicating to the parser that the subsequent characters need to be interpreted as hexadecimal).
Hope you found this post useful. It was published . Please show your love and support by sharing this post.