HTMLHTML Entities

HTML entities are used to display reserved characters like <, >, &, etc. They start with & and end with ;.

Examples:

  • &lt; = <
  • &gt; = >
  • &amp; = &
  • &nbsp; = non-breaking space
<p>5 &lt; 10 and 10 &gt; 5</p>
<p>Use &amp; to show an ampersand</p>