
- HTML - Home
- HTML - Roadmap
- HTML - Introduction
- HTML - History & Evolution
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Headings
- HTML - Paragraphs
- HTML - Fonts
- HTML - Blocks
- HTML - Style Sheet
- HTML - Formatting
- HTML - Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Frames
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Code Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Table Headers & Captions
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB & RGBA Colors
- HTML - HEX Colors
- HTML - HSL & HSLA Colors
- HTML - HSL Color Picker
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - Document Object Model (DOM)
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Character Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
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.
<!DOCTYPE html> <html> <head> <title> Symbols in HTML </title> </head> <body> <h1>Common HTML Symbols</h1> <p>Registered trademark Symbol : ® </p> <p>Trademark Symbol : ™ </p> <p>Copyright Symbol : © </p> <p>Left Arrow Symbol : ← </p> </body> </html>
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 −
Symbols | Description | Entity Name | Entity Number |
---|---|---|---|
₹ | Indian Rupee Symbol | NA | ₹ |
€ | Euro Symbol | € | € |
₿ | Bitcoin Symbol | NA | ₿ |
¥ | Japanese Yen Symbol | ¥ | ¥ |
₽ | Ruble Symbol | NA | ₽ |
Example: Inserting Currency Symbols in HTML
In the following example, we are going to display a few currency symbols using their corresponding entities −
<!DOCTYPE html> <html> <head> <title> Symbols in HTML </title> </head> <body> <h1>Common Currency Symbols</h1> <p>Indian Rupee Symbol : ₹ </p> <p>Euro Symbol : € </p> <p>Bitcoin Symbol : ₿ </p> <p>Japanese Yen Symbol : ¥ </p> </body> </html>
HTML Mathematical Symbols
The following table shows mathematical symbols and their corresponding entities −
Symbols | Description | Entity Name | Entity 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.
<!DOCTYPE html> <html> <head> <title> Symbols in HTML </title> </head> <body> <h1>Common Mathematical Symbols</h1> <p>For all symbol : ∀ </p> <p>Nabla symbol : ∇ </p> <p>Empty sets symbol : ∅ </p> <p>Summation symbol : ∑ </p> </body> </html>
HTML Arrow Symbols
The following table shows arrows symbols and their corresponding entities −
Symbol | Entity Name | Entity Number | Description & 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.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>HTML Arrow Symbols</title> </head> <body> <h2>HTML Arrow Symbols</h2> <p>Left Arrow: ← (← or ←)</p> <p>Up Arrow: ↑ (↑ or ↑)</p> <p>Right Arrow: → (→ or →)</p> <p>Down Arrow: ↓ (↓ or ↓)</p> <p>Left-Right Arrow: ↔ (↔ or ↔)</p> </body> </html>
HTML Miscellaneous Symbols
The following table shows miscellaneous symbols and their corresponding entities −
Symbol | Entity Name | Entity Number | Description & 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:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>HTML Miscellaneous Symbols</title> </head> <body> <h2>HTML Miscellaneous Symbols</h2> <p>Copyright Symbol: © (© or ©)</p> <p>Registered Trademark: ® (® or ®)</p> <p>Trademark Symbol: ™ (™ or ™)</p> <p>Section Symbol: § (§ or §)</p> <p>Paragraph Symbol: ¶ (¶ or ¶)</p> </body> </html>