"HTML5 e CSS3 - Módulo 2"
Entities

"Curso em Vídeo"
This is the student's notebook of Ricardo Barros Becheli

Entities

Entities are used to return / display special symbols.

An HTML entity is used to display >invisible characters and reserved characters that would otherwise be interpreted as HTML code.

An HTML entity is a piece of text, or string, that begins with an ampersand ( & ) and ends with a semicolon ( ; ).

For instance, HTML will interpret the less-than sign ( < ) as a tag opening if you don't write it as an entity.

The &lt; entity makes <

When I type the 3 characters above together (without scaping through an entity) they make this symbol: <

But if I want to show you the code that makes < I have to replace the & (ampersand) for its respactive entity, which is "&amp".

lt (LT in lowercase) means LESS THAN.

Always with a semicolon at the end.

The &gt; entity makes >

The same as above applies here, with "gt" instead of that.

gt means GREATER THAN.

Always with a semicolon at the end, as well.

Here we have 8 symbols written this way:

  1. ®
  2. ©
  3. ¥

See a complete list of HTML entities at devmedia.com.