/    /  HTML Entities

HTML Entities

 

HTML characters are the replacement of reserved characters in HTML. We can also replace characters that are not present on your keyboard with entities.

HTML entities provide a wide range of characters that can allow adding icons, geometric shapes, mathematical operators, etc.

you cannot use the less than (<) or greater than (>) signs or angle brackets within your content because the browser could mistake them for markup, while some characters are not present on the keyboard like copyright symbol ©.

 

use an entity:

 

You can use an entity in your HTML document(file) by name or by a numerical character reference. Each one (entity) starts with the symbol ampersand (&) and ends with a semicolon (;).

 

Syntax:

 

&entity_name; 
 OR 
&#entity_number;

 

HTML Character Entities:

 

HTML Entities

 

Note: Entity names are case sensitive.

Advantage: An entity name is easy to remember.

Disadvantage: Browsers may not support all entity names, but numbers were supported.

 

Diacritical Marks in HTML:

 

Some special types of letters provide in HTML which has some glyph added to the top or below the letters. These glyphs are called diacritical marks.

Some diacritical marks are, like grave (  ̀) and acute (  ́) are called accents.

 

HTML Entities