HTML Entities
What is Entities in HTML?
HTML entities are special character codes used to display characters that are either reserved in HTML or not readily available on standard keyboards.
Characters like the less-than symbol (<) and greater-than symbol (>) are crucial for HTML tags. To display them as text, you need entities.
Using entities prevents your browser from misinterpreting these codes as part of your HTML structure.
Entities provide a way to include a wide range of symbols (e.g., ©, ½, ¿) and accented characters from different languages.
Types of HTML Entities:
Named Entities: These have easy-to-remember names. Examples:
Numeric Entities: These use a decimal or hexadecimal reference code. Examples:
HTML Entity List
Character | Entity Name |
---|---|
! | |
# | |
$ | |
% | |
& | |
( | |
) | |
< | |
> | |
@ | |
^ | |
© |