What are Unicodes?

Unicodes are universal characters that represent different things. These could be symbols, characters, scripts, and many more forms of character combinations.

Unicodes are adopted by many platforms (mobile and web) to make characters available everywhere.

ADVERTISEMENT

Why are Unicodes useful?

Unicodes are useful because they provide a standard for character representations across different systems and languages.

Unicode also represents special characters that are not available in ASCII and helps us create consistent character displays on various platforms.

You can also apply styles (colors, sizes) like you would with other characters.

How to use Unicodes in HTML

You can write most Unicode symbols in two ways: using the hexadecimal reference or using the entity name.

Hexadecimal references are usually hard to read, but entity names are generally descriptive for the Unicode symbol you want to write.

For hexadecimal numbers, you write them in between &# (an ampersand and a number sign) and ; (a semi-colon) like this:

&#[NUMBER];

For entity names, you write them in between & and ; like this:

&[ENTITY];

This syntax is necessary so that HTML understands that the characters you're writing are not just text but Unicode symbol representations.

ADVERTISEMENT

Unicode for Single and Double Left and Right Arrows

Now that we've briefly looked at what Unicode is and how to use it in HTML, let's look at some examples.

There are many symbols with Unicode representations you can use in HTML. For this article, I will share four examples of arrow symbols.

There are different arrow symbols and Unicode values for them. The arrows used here are just examples.

Left Arrow

For the single left arrow:

The hexadecimal reference is 8592 and the entity name is larr. In HTML, it would be written like:

←
<!-- or -->
&larr;

This code will print this on a page:

image-100

For the double left arrow:

The hexadecimal reference is 8647 and the entity name is llarr written as:

&#8647;
<!-- or -->
#llarr

This will result in:

image-99
ADVERTISEMENT

Right arrow

For the single right arrow:

The hexadecimal reference is 8594 and the entity name is rarr written like:

&#8594;
<!-- or -->
&rarr;

The result:

image-98

For the double right arrow:

The hexadecimal reference is 8649 and the entity name is rrarr written as:

&#8649;;
<!-- or -->
#rrarr

This will result in:

image-101

You can use Unicode representations to print many other symbols in HTML. You can either use the hexadecimal reference or the entity name of the symbol, as I have shown you in this article.