HTML - Entities

HTML entities are special codes used to represent reserved characters, symbols, and special characters that have specific meanings in HTML. By using HTML entities, you can display these characters on a web page without the browser interpreting them as HTML markup. Here are some commonly used HTML entities:

Character Entities:

  • &lt; or &#60;: Represents the less-than symbol (<).
  • &gt; or &#62;: Represents the greater-than symbol (>).
  • &amp; or &#38;: Represents the ampersand symbol (&).
  • &quot; or &#34;: Represents the double quotation mark (").
  • &apos; or &#39;: Represents the single quotation mark (').

Special Characters:

  • &nbsp; or &#160;: Represents a non-breaking space.
  • &copy; or &#169;: Represents the copyright symbol (©).
  • &reg; or &#174;: Represents the registered trademark symbol (®).
  • &trade; or &#8482;: Represents the trademark symbol (™).

Mathematical and Greek Symbols:

  • &plus; or &#43;: Represents the plus symbol (+).
  • &minus; or &#8722;: Represents the minus symbol (-).
  • &times; or &#215;: Represents the multiplication symbol (×).
  • &divide; or &#247;: Represents the division symbol (÷).
  • &pi; or &#960;: Represents the mathematical pi symbol (π).
  • &delta; or &#948;: Represents the Greek letter delta (Δ).

Accented Characters:

  • &eacute; or &#233;: Represents the lowercase e with acute accent (é).
  • &ouml; or &#246;: Represents the lowercase o with umlaut (ö).
  • &ccedil; or &#231;: Represents the lowercase c with cedilla (ç).

These are just a few examples of HTML entities. There are many more entities available to represent various characters and symbols. You can find a comprehensive list of HTML entities and their corresponding codes in the HTML specification or online resources.

To use an HTML entity, you can either use the entity name (e.g., &copy;) or the decimal numeric code (e.g., &#169;). The entity or code is placed directly within the HTML content where you want the corresponding character or symbol to appear.