CodesCompiler
๐Ÿ”
HTMLCSSJavaScriptPythonSQLPHPSEOPostsBooksKids About Contact ๐Ÿš€ Get Started Free

HTML - Symbols

HTML - Symbols

In HTML, you can embed the symbols and special characters that are not available on the keyboard using the HTML entities .

What are HTML Symbols?

HTML symbols are some characters that hold a special meaning and are difficult to type directly on the keyboard. They are often termed as โ€œsymbols.โ€ For example, other than the dollar symbol, we canโ€™t find any currency symbols like rupees and euros on normal keyboards. However, HTML provides other ways to insert these symbols into webpages. In this tutorial, we are going to learn how to use special characters or symbols in an HTML document.

Inserting Symbols in HTML Document

To insert symbols into an HTML document, we use entities. If no entity name exists, then we are allowed to use the entity number, which is a decimal or a hexadecimal reference. An HTML entity is a piece of text that begins with an ampersand (&) and ends with a semicolon (;). They are used to represent characters and symbols that are either reserved in HTML or not directly available on keyboards for use on the web page.

There are two types of HTML entities: named entities and numeric entities . The named entities use a descriptive name to refer to a character or symbol, such as ยฉ for the copyright symbol. Numeric entities use a number to refer to a character or symbol, such as ยฉ for the same symbol.

Example

The following example shows how to insert the most commonly used symbols into an HTML document.

Preview

When a user executes the above code, it will produce four different symbols, namely copyright, trademark, registered trademark, and left arrow.

HTML Currency Symbols

The following table shows currency symbols and their corresponding entities โˆ’

SymbolsDescriptionEntity NameEntity Number
โ‚นIndian Rupee SymbolNAโ‚น
โ‚ฌEuro Symbolโ‚ฌโ‚ฌ
โ‚ฟBitcoin SymbolNAโ‚ฟ
ยฅJapanese Yen Symbolยฅยฅ
โ‚ฝRuble SymbolNAโ‚ฝ

Example: Inserting Currency Symbols in HTML

In the following example, we are going to display a few currency symbols using their corresponding entities โˆ’

Preview

HTML Mathematical Symbols

The following table shows mathematical symbols and their corresponding entities โˆ’

SymbolsDescriptionEntity NameEntity Number
โˆ€For all symbolโˆ€โˆ€
โˆ…Empty sets symbolโˆ…โˆ…
โˆ‡Nabla symbolโˆ‡โˆ‡
โˆ‘Summation symbolโˆ‘โˆ‘
โˆˆElement ofโˆˆโˆˆ

Example: Inserting Mathematical Symbols in HTML

In this example, we will demonstrate how to insert mathematical symbols into an HTML document.

Preview

HTML Arrow Symbols

The following table shows arrows symbols and their corresponding entities โˆ’

SymbolEntity NameEntity NumberDescription & Example
โ†โ†โ†Left Arrow: โ†
โ†‘โ†‘โ†‘Up Arrow: โ†‘
โ†’โ†’โ†’Right Arrow: โ†’
โ†“โ†“โ†“Down Arrow: โ†“
โ†”โ†”โ†”Left-Right Arrow: โ†”

Example: Inserting Arrow Symbols in HTML

In this example, we will demonstrate how to insert arrow symbols into an HTML document.

Preview

HTML Miscellaneous Symbols

The following table shows miscellaneous symbols and their corresponding entities โˆ’

SymbolEntity NameEntity NumberDescription & Example
ยฉยฉยฉCopyright: ยฉ
ยฎยฎยฎRegistered Trademark: ยฎ
โ„ขโ„ขโ„ขTrademark: โ„ข
ยงยงยงSection: ยง
ยถยถยถParagraph: ยถ

Example: Inserting Miscellaneous Symbols in HTML

In this example, we will miscellaneous how to insert arrow symbols into an HTML document:

Preview