HTML Entities

 

HTML Entities

HTML Entities are used to display reserved characters in HTML.

Entities are written in two different ways. The can be written with a name or a number:

Entity Name

&entityname;

Entity Number

&#entitynumber;

All entity characters begin with an ampersand (&), followed by the entity name or number and end with the semicolon (;). For example, the entity number for a copyright symbol is 169 and will look like this:

<p style="text-align: center">© Year Company, Inc. All Rights Reserved.</p>

Popular HTML entities

    Character Entity name Description
  < &lt; less than
  > &gt; greater than
  & &amp; ampersand
  " &quot; quotation mark
  ' &#39; apostrophe
  ¢ &cent; cent
  £ &pound; pound
  ¥ &yen; yen
  &euro;  euro
  § &sect; section
  © &copy; copyright
  ® &reg; registered trademark
  × &times; multiplication
  ÷ &divide; division
  &trade; trade mark
    &nbsp; space

 

Entities are also used to create special symbols in HTML that are not included within the keyboard.

In addition, entities are used to display symbols, such as the copyright ©, which is also not available on the keyboard.

 

Entities contain case-sensitive terms or acronym parallels for their values, as it can be difficult to deal with the numbering system. For example, the registered trademark symbol entity is ® and will be displayed like this:

<p style="text-align: center">® Year Company, Inc. All Rights Reserved.</p>

Reserved Characters in HTML

In HTML, various characters are reserved. For instance, you cannot make use of the greater than or less than symbols inside your code, as the browser would look at the symbols as HTML markup. Below are some of the characters reserved in HTML:

    Character Entity Name Entity Number Description
  < &lt; &#60; less than
  > &gt; &#62; greater than
  &apos; &#39; apostrophe
  & &amp; &#38; ampersand
  &quot; &#3 quotation mark

 

 
This concludes the HTML Entities section. For additional tips and codes, visit the HTML Audio section.