– special symbols supported by HTML
– how to add special symbols in HTML
Special symbols in HTML
This core section presents the classification of special symbols and provides the functionality of these symbols using examples.
Mathematical symbols in HTML
The basic mathematical symbols are available on the keyboard. However, various advanced-level mathematical symbols can be used in HTML that may not be found on the keyboards. Let’s have a look at these symbols.
|Symbols||Description||Entity Name||Decimal Value||HEX value|
|∉||Does not belong to||∉||∉||∉|
|⊆||Subset of/equal to||⊆||⊆||⊆|
|⊇||Superset of/equal to||⊇||⊇||⊇|
The above table provides the symbols that are frequently used in HTML. Let’s go through the following examples to add the mathematical symbols in HTML.
How to add mathematical symbols in HTML
The code provided here represents the ways to add mathematical symbols in HTML.
The code is described as,
– three mathematical symbols named for all, empty set, and proportional to are added in HTML
– for all symbol is added using its entity name whereas the empty set and proportional to are added using their decimal and HEX values respectively.
The output shows that all the symbols are presented using the various representations in HTML.
Greek symbols in HTML
The Greek symbols are also not available on the keyboard and thus cannot be added directly. The table shows the list of various Greek letters along with their entity names and entity numbers.
|Symbols||Description||Entity Name||Entity Number|
Let’s practice them using an example
How to add Greek symbols in HTML
The code provided below prints the Greek letters using their entity names and entity numbers. S
The above code contains four paragraphs in which Alpha, Beta, Gamma, and Delta are used. The entity name is used for Alpha and Gamma whereas the Beta and Delta are added using their entity numbers.
The relevant Greek symbols can be observed from the output.
Currency symbols in HTML
Currency symbols are also not available on the normal keyboard except the dollar sign($). However, they can also be added using the HEX value and decimal values that are provided in the following table.
|Symbol||Description||Decimal Value||HEX value|
|€||Euro (European currency)||€||€|
|₺||Turkish Lira (Turkey Currency)||₤||₤|
|₿||Bitcoin (Digital Currency)||₿||₿|
|₣||Franc (French Currency)||₣||₣|
Let’s add them in an HTML document.
How to add currency symbols in HTML
The example provided below adds various currency signs in an HTML document.
In the above code,
– four paragraphs are used that are supposed to get the symbol of Euro, Rupee, Turkish Lira, and Bitcoin.
– these currency symbols are added using the HEX and decimal values
Other symbols in HTML
The symbols that do not belong to the above categories are discussed here. The following table lists down these symbols with their entity names/numbers.
|Symbol||Description||Entity Number||Entity Number|
How to add these symbols in HTML
The following HTML code adds the above symbols to HTML.
Four paragraphs are practiced that uses the entity names and entity numbers of copyright, trademark, left-arrow, and right-arrow. s
The output shown above displays the copyright, trademark, let-arrow, and right-arrow.
The special symbols refer to those that cannot be added directly to HTML. These symbols can either be added by using the entity names, HEX values, or decimal values. This post provides possible ways to add special symbols in HTML. Firstly, we classified the special symbols into categories named, mathematical symbols, Greek symbols, currency symbols, and mixed. Furthermore, we have added an example in each category that demonstrates the addition of special symbols in HTML.