What are HTML Entities?

What are HTML Entities?

HTML Entities


Some reserved characters are reserved in HTML.

  1. If you use the less than(<) or greater than(>) signs in your text, the browser might mix them with tags.

  2. Character entities are used to display reserved characters in HTML.

    Ex: &entity_name;

    (or)

    &#entity_number;0=

    To display a less than sign(<) we must write: &lt; or &#60;

Advantages of using an entity name


-> An entity name is easy to remember.

Disadvantage of using an entity_number


-> Browsers may not support all entity names, but the support for entity numbers is good.