- HTML Course
- HTML Tutorial
- HTML Document Structure
- HTML Root Tags
- HTML Flow Tags
- HTML Interactive Tags
- HTML Basic Tags
- HTML Paragraph
- HTML Line Break
- HTML Horizontal Line
- HTML Images
- HTML Data Types
- HTML Attributes
- HTML Character Entities
- HTML Styles
- HTML Formatting Text
- HTML Logical Style Text
- HTML Organizing Text
- HTML List
- HTML Tables
- HTML Forms
- HTML action Attribute
- HTML Multimedia
HTML Character Entities and Codes
This article was created and published to list some of the characters that cannot be found on a normal keyboard, along with their entities and codes. Sometimes, we need to put some characters on the web, like "copyright sign (©)," "registered trade mark sign (®)," etc., but these types of symbols, signs, or characters cannot be found on the normal keyboard; therefore, we can use the HTML entity or code to put these characters on the web.
However, some of the characters, like "less than sign (<)", "greater than sign (>)", etc., are available on the normal keyboard, but using them directly on the web is not a professional way. Rather, use its entity or code. As a result, this article was written to guide you through the process of using HTML entities and codes to display characters on the web.
Some special characters, such as > and <, may be required in the content of an HTML element. These characters are referred to as "entities." So, using the various character entities, HTML allows us to include such symbols in the content of an element. The character entities are referred to as "character encodings" by the World Wide Web Consortium (W3C). Some characters, such as Greek and Chinese, do not appear on the user's keyboard. As a result, they cannot be typed directly from the keyboard. This issue can be avoided by using character entities in an HTML document.
The character entity is made up of the following parts in the following order:
- Ampersand symbol (&)
- Name of the entity
- A terminating semicolon (;)
List of the most commonly used HTML character entities
The table below contains codes and entity names for some of the most commonly used and well-known HTML character entities.
HTML Entity | HTML Code | Character, Symbol, and Sign |
---|---|---|
< | < | < |
> | > | > |
& | & | & |
" | " | " |
' | ' | ' |
© | © | © |
® | ® | ® |
@ | @ | @ |
™ | ™ | ™ |
☎ | ☎ | ☎ |
☻ | ☻ | |
✉ | ✉ | |
✍ | ✍ | |
✓ | ✓ | ✓ |
✗ | ✗ | ✗ |
✚ | ✚ | |
¢ | ¢ | ¢ |
£ | £ | £ |
¥ | ¥ | ¥ |
€ | € | € |
$ | $ | $ |
That's it. The table above includes all of the most commonly used and well-known HTML characters, as well as their entities and codes. Now let me give an example to show how to implement these entities and/or characters to put the character on the web.
<!DOCTYPE html> <html> <body> <h2>Company Name</h2> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p> <footer> <p>☎ +11234567890 | ✉ admin@company.com</p> <p>© 2022 Company</p> </footer> </body> </html>
The output produced by the above HTML example, which uses a total of three HTML entities, should exactly be:
The contact information that was provided in the example earlier has nothing to do with us. The only reason I recorded the random numbers was to use them as an example.
« Previous Tutorial Next Tutorial »